From 6392a921bc815b1e60b2c2f6235318087d8a5b52 Mon Sep 17 00:00:00 2001 From: Ajay D'Souza Date: Sun, 28 Jul 2024 21:01:32 +0100 Subject: [PATCH] manual_related and include_post_ids stopped working Fixes #206 --- contextual-related-posts.php | 2 +- includes/class-crp.php | 2 +- includes/frontend/class-shortcodes.php | 4 ++-- readme.txt | 7 ++++++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/contextual-related-posts.php b/contextual-related-posts.php index 82eba6c..9e53542 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.5.3 + * Version: 3.5.4-beta1 * Author: WebberZone * Author URI: https://webberzone.com * License: GPL-2.0+ diff --git a/includes/class-crp.php b/includes/class-crp.php index 0af1400..dfd79cf 100644 --- a/includes/class-crp.php +++ b/includes/class-crp.php @@ -181,7 +181,7 @@ public function prepare_query_args( $args = array() ) { $defaults = array( 'include_cat_ids' => 0, - 'include_post_ids' => 0, + 'include_post_ids' => null, 'offset' => 0, 'postid' => false, 'strict_limit' => true, diff --git a/includes/frontend/class-shortcodes.php b/includes/frontend/class-shortcodes.php index 9eeaccc..c31430e 100644 --- a/includes/frontend/class-shortcodes.php +++ b/includes/frontend/class-shortcodes.php @@ -42,10 +42,10 @@ public static function related_posts( $atts, $content = null ) { // phpcs:ignore 'is_shortcode' => 1, 'offset' => 0, 'include_cat_ids' => '', - 'include_post_ids' => '', + 'include_post_ids' => null, 'related_meta_keys' => '', 'include_words' => '', - 'manual_related' => '', + 'manual_related' => null, ); /** diff --git a/readme.txt b/readme.txt index 34624a9..a674d50 100644 --- a/readme.txt +++ b/readme.txt @@ -153,10 +153,15 @@ If you enable thumbnails, the plugin will try to find the correct thumbnail in t == Changelog == -= 3.5.3 = += 3.5.4 = Release post: [https://webberzone.com/announcements/contextual-related-posts-v3-5-0/](https://webberzone.com/announcements/contextual-related-posts-v3-5-0/) +* Fixes: + * `include_post_ids` and `manual_related` were not being passed correctly to the query + += 3.5.3 = + * Modifications: * Updated Freemius SDK to 2.7.3 * Updated Contextual Related Posts block apiVersion to 3