Yet Another Related Posts Plugin (YARPP) - Version 5.7.0

Version Description

(18-August-2020) = * Enhancement: Ensure that when a post is finally published, YARPP cache for peer posts is cleared to ensure the most related posts are always recommended across every post * Bugfix: Fixed warning in Admin UI caused by an unnecessary HTML comment * Bugfix: When priming YARPP's cache, if "Display posts from other post types" is false, we now only include posts of the current post type

Download this release

Release Info

Developer jeffparker
Plugin Icon 128x128 Yet Another Related Posts Plugin (YARPP)
Version 5.7.0
Comparing to
See all releases

Code changes from version 5.6.0 to 5.7.0

classes/YARPP_Cache.php CHANGED
@@ -101,7 +101,7 @@ abstract class YARPP_Cache {
101
  }
102
 
103
  // Publish
104
- if ($old_status !== 'publish' && $new_status === 'publish') {
105
  /*
106
  * Find everything which is related to this post, and clear them,
107
  * so that this post might show up as related to them.
@@ -226,7 +226,11 @@ abstract class YARPP_Cache {
226
  if (isset($args['post_type'])) {
227
  $post_types = (array) $args['post_type'];
228
  } else {
229
- $post_types = $this->core->get_post_types();
 
 
 
 
230
  }
231
  $sql = '('.str_replace("post_type = 'post'", "post_type IN ('" . implode("','",$post_types). "')", $newsql).')';
232
 
101
  }
102
 
103
  // Publish
104
+ if ($new_status === 'publish') {
105
  /*
106
  * Find everything which is related to this post, and clear them,
107
  * so that this post might show up as related to them.
226
  if (isset($args['post_type'])) {
227
  $post_types = (array) $args['post_type'];
228
  } else {
229
+ if ($this->core->get_option('cross_relate')) {
230
+ $post_types = $this->core->get_post_types();
231
+ } else {
232
+ $post_types = array(get_post_type($reference_post));
233
+ }
234
  }
235
  $sql = '('.str_replace("post_type = 'post'", "post_type IN ('" . implode("','",$post_types). "')", $newsql).')';
236
 
includes/phtmls/yarpp_options.phtml CHANGED
@@ -47,7 +47,7 @@
47
  <?php wp_nonce_field( 'update_yarpp', 'update_yarpp-nonce' ); ?>
48
  </div>
49
 
50
- </div><!--#poststuff-->
51
 
52
  </form>
53
 
47
  <?php wp_nonce_field( 'update_yarpp', 'update_yarpp-nonce' ); ?>
48
  </div>
49
 
50
+ </div>
51
 
52
  </form>
53
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires at least: 3.7
5
  Requires PHP: 5.3
6
  License: GPLv2 or later
7
  Tested up to: 5.5
8
- Stable tag: 5.6.0
9
 
10
  The most popular plugin to display a list of related posts on your site based on a powerful unique algorithm.
11
 
@@ -282,6 +282,11 @@ add_action(
282
  `
283
 
284
  == Changelog ==
 
 
 
 
 
285
  = 5.6.0 (13-August-2020) =
286
  * New: Configurable in-browser caching option for YARPP REST API
287
  * Bugfix: Always include unused categories and terms in YARPP Admin options
@@ -1002,6 +1007,6 @@ After a break of many years, the plugin is 100% supported now that the baton has
1002
  * Initial upload
1003
 
1004
  == Upgrade Notice ==
1005
- = 5.6.0 =
1006
  We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thank you for using YARPP!
1007
 
5
  Requires PHP: 5.3
6
  License: GPLv2 or later
7
  Tested up to: 5.5
8
+ Stable tag: 5.7.0
9
 
10
  The most popular plugin to display a list of related posts on your site based on a powerful unique algorithm.
11
 
282
  `
283
 
284
  == Changelog ==
285
+ = 5.7.0 (18-August-2020) =
286
+ * Enhancement: Ensure that when a post is finally published, YARPP cache for peer posts is cleared to ensure the most related posts are always recommended across every post
287
+ * [Bugfix](https://wordpress.org/support/topic/an-error-occurred-while-processing-the-directive-6/): Fixed warning in Admin UI caused by an unnecessary HTML comment
288
+ * [Bugfix](https://wordpress.org/support/topic/related-posts-show-on-pages-not-posts/#post-13177845): When priming YARPP's cache, if "Display posts from other post types" is false, we now only include posts of the current post type
289
+
290
  = 5.6.0 (13-August-2020) =
291
  * New: Configurable in-browser caching option for YARPP REST API
292
  * Bugfix: Always include unused categories and terms in YARPP Admin options
1007
  * Initial upload
1008
 
1009
  == Upgrade Notice ==
1010
+ = 5.7.0 =
1011
  We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thank you for using YARPP!
1012
 
yarpp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Yet Another Related Posts Plugin (YARPP)
4
  Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm.
5
- Version: 5.6.0
6
  Author: YARPP
7
  Author URI: https://yarpp.com/
8
  Plugin URI: https://yarpp.com/
@@ -23,7 +23,7 @@ if(!defined('WP_CONTENT_DIR')){
23
  define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
24
  }
25
 
26
- define('YARPP_VERSION', '5.6.0');
27
 
28
  define('YARPP_DIR', dirname(__FILE__));
29
  /**
2
  /*
3
  Plugin Name: Yet Another Related Posts Plugin (YARPP)
4
  Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm.
5
+ Version: 5.7.0
6
  Author: YARPP
7
  Author URI: https://yarpp.com/
8
  Plugin URI: https://yarpp.com/
23
  define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
24
  }
25
 
26
+ define('YARPP_VERSION', '5.7.0');
27
 
28
  define('YARPP_DIR', dirname(__FILE__));
29
  /**