From efcf4e499e11e722259cf2bf29c6660734ccb317 Mon Sep 17 00:00:00 2001 From: Ajay D'Souza Date: Tue, 31 Oct 2023 09:31:12 +0000 Subject: [PATCH] Issue searching pages/posts fixed Fixes #192 --- contextual-related-posts.php | 2 +- includes/admin/js/bulk-edit.js | 2 +- includes/admin/js/bulk-edit.min.js | 2 +- includes/admin/modules/class-bulk-edit.php | 2 +- readme.txt | 5 +++++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/contextual-related-posts.php b/contextual-related-posts.php index dfbe6c8..676821e 100644 --- a/contextual-related-posts.php +++ b/contextual-related-posts.php @@ -15,7 +15,7 @@ * Plugin Name: Contextual Related Posts * Plugin URI: https://webberzone.com/plugins/contextual-related-posts/ * Description: Display related posts on your website or in your feed. Increase reader retention and reduce bounce rates - * Version: 3.4.0 + * Version: 3.4.1-beta1 * Author: WebberZone * Author URI: https://webberzone.com * License: GPL-2.0+ diff --git a/includes/admin/js/bulk-edit.js b/includes/admin/js/bulk-edit.js index fb1bbb1..8f57607 100644 --- a/includes/admin/js/bulk-edit.js +++ b/includes/admin/js/bulk-edit.js @@ -24,7 +24,7 @@ jQuery(document).ready(function ($) { // get the data const crp_manual_related = $('.crp_manual_related', post_row).text(); - const crp_exclude_this_post = 1 == $('.crp_exclude_this_post', post_row).val() ? true : false; + const crp_exclude_this_post = 1 == $('.crp_exclude_this_post', post_row).text() ? true : false; // populate the data $(':input[name="crp_manual_related"]', edit_row).val(crp_manual_related); diff --git a/includes/admin/js/bulk-edit.min.js b/includes/admin/js/bulk-edit.min.js index 55cdb88..7595cc3 100644 --- a/includes/admin/js/bulk-edit.min.js +++ b/includes/admin/js/bulk-edit.min.js @@ -1 +1 @@ -jQuery(document).ready((function(t){const e=inlineEditPost.edit;inlineEditPost.edit=function(n){if(e.apply(this,arguments),"object"==typeof n&&(n=parseInt(this.getId(n))),n>0){const e=t("#edit-"+n),a=t("#post-"+n),c=t(".crp_manual_related",a).text(),i=1==t(".crp_exclude_this_post",a).val();t(':input[name="crp_manual_related"]',e).val(c),t(':input[name="crp_exclude_this_post"]',e).prop("checked",i)}},t("#bulk_edit").on("click",(function(){const e=t("#bulk-edit"),n=[],a=t(':input[name="crp_manual_related"]',e).val(),c=t('select[name="crp_exclude_this_post"]',e).val();e.find("#bulk-titles-list .ntdelbutton").each((function(){n.push(t(this).attr("id").replace(/^(_)/i,""))})),n.map((function(t,e,n){n[e]=parseInt(t)})),t.ajax({url:ajaxurl,type:"POST",async:!1,cache:!1,data:{action:"crp_save_bulk_edit",post_ids:n,crp_manual_related:a,crp_exclude_this_post:c,crp_bulk_edit_nonce:crp_bulk_edit.nonce}})}))})); \ No newline at end of file +jQuery(document).ready((function(t){const e=inlineEditPost.edit;inlineEditPost.edit=function(n){if(e.apply(this,arguments),"object"==typeof n&&(n=parseInt(this.getId(n))),n>0){const e=t("#edit-"+n),c=t("#post-"+n),i=t(".crp_manual_related",c).text(),a=1==t(".crp_exclude_this_post",c).text();t(':input[name="crp_manual_related"]',e).val(i),t(':input[name="crp_exclude_this_post"]',e).prop("checked",a)}},t("#bulk_edit").on("click",(function(){const e=t("#bulk-edit"),n=[],c=t(':input[name="crp_manual_related"]',e).val(),i=t('select[name="crp_exclude_this_post"]',e).val();e.find("#bulk-titles-list .ntdelbutton").each((function(){n.push(t(this).attr("id").replace(/^(_)/i,""))})),n.map((function(t,e,n){n[e]=parseInt(t)})),t.ajax({url:ajaxurl,type:"POST",async:!1,cache:!1,data:{action:"crp_save_bulk_edit",post_ids:n,crp_manual_related:c,crp_exclude_this_post:i,crp_bulk_edit_nonce:crp_bulk_edit.nonce}})}))})); \ No newline at end of file diff --git a/includes/admin/modules/class-bulk-edit.php b/includes/admin/modules/class-bulk-edit.php index 908024d..1b6cd8c 100644 --- a/includes/admin/modules/class-bulk-edit.php +++ b/includes/admin/modules/class-bulk-edit.php @@ -119,7 +119,7 @@ public function populate_custom_columns( $column_name, $post_id ) { echo '

'; esc_html_e( 'Exclude from list:', 'contextual-related-posts' ); echo wp_kses_post( $exclude_this_post ? '' : '' ); - echo ''; + echo '

'; echo '

'; break; diff --git a/readme.txt b/readme.txt index 18b81b6..6ae27e7 100644 --- a/readme.txt +++ b/readme.txt @@ -133,6 +133,11 @@ Contextual Related Posts is one of the many plugins developed by WebberZone. Che == Changelog == += 3.4.1 = + +* Bug fix: + * Fixed Request-URI Too Long error when searching for pages/posts + = 3.4.0 = Release post: [https://webberzone.com/blog/contextual-related-posts-v3-4-0/](https://webberzone.com/blog/contextual-related-posts-v3-4-0/)