Yet Another Related Posts Plugin (YARPP) - Version 3.2.1

Version Description

  • Bugfix: Duplicate results shown for some users
  • Bugfix: With PHP4, the "related posts" would simply show the current post
    • This was due to an issue with object references in PHP4. What a pain!
    • A big thanks to Brendon Held of inMotion Graphics for being incredibly patient and letting me try out different diagnostics on his server.
  • Better handling of post_status transitions.
  • Bugfix: the widget was not working on pages
  • Added overused words list for French, thanks to saymonz
  • Minor code cleanup:
    • Fixed a bug in yarpp_related_exists()
    • Removed legacy code for gracefully upgrading from YARPP versions < 1.5 and working with WordPress versions < 2.8.
    • Cleanup of yarpp_upgrade_check() calling
    • Cleanup of yarpp_version_json(), including caching and minor security fix
    • Eliminated a couple globals
    • Cleaned up some edge case causes for "unexpected output" on plugin activation
    • Removed WP Help Center badge, as they are closing
Download this release

Release Info

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

Code changes from version 3.2.1b4 to 3.2.1

Files changed (3) hide show
  1. includes.php +4 -4
  2. readme.txt +1 -1
  3. yarpp.php +2 -2
includes.php CHANGED
@@ -344,11 +344,11 @@ function yarpp_microtime_float() {
344
return ((float)$usec + (float)$sec);
345
}
346
347
- function yarpp_version_json($just_cache = false) {
348
- if (!$just_cache)
349
check_ajax_referer('yarpp_version_json');
350
351
- if (!$just_cache && false === ($result = get_transient('yarpp_version_json'))) {
352
$version = YARPP_VERSION;
353
$remote = wp_remote_post("http://mitcho.com/code/yarpp/checkversion.php?version=$version");
354
@@ -356,7 +356,7 @@ function yarpp_version_json($just_cache = false) {
356
357
set_transient('yarpp_version_json', $result, 60*60*12);
358
}
359
- if ($just_cache)
360
return $result;
361
362
echo $result;
344
return ((float)$usec + (float)$sec);
345
}
346
347
+ function yarpp_version_json($enforce_cache = false) {
348
+ if (!$enforce_cache)
349
check_ajax_referer('yarpp_version_json');
350
351
+ if ($enforce_cache || false === ($result = get_transient('yarpp_version_json'))) {
352
$version = YARPP_VERSION;
353
$remote = wp_remote_post("http://mitcho.com/code/yarpp/checkversion.php?version=$version");
354
356
357
set_transient('yarpp_version_json', $result, 60*60*12);
358
}
359
+ if ($enforce_cache)
360
return $result;
361
362
echo $result;
readme.txt CHANGED
@@ -7,7 +7,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4D
7
Tags: related, posts, post, pages, page, RSS, feed, feeds
8
Requires at least: 3.0
9
Tested up to: 3.1
10
- Stable tag: 3.2
11
12
Display a list of related entries on your site and feeds based on a unique algorithm. Templating allows customization of the display.
13
7
Tags: related, posts, post, pages, page, RSS, feed, feeds
8
Requires at least: 3.0
9
Tested up to: 3.1
10
+ Stable tag: 3.2.1
11
12
Display a list of related entries on your site and feeds based on a unique algorithm. Templating allows customization of the display.
13
yarpp.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Yet Another Related Posts Plugin
4
Plugin URI: http://mitcho.com/code/yarpp/
5
Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
6
- Version: 3.2.1b4
7
Author: mitcho (Michael Yoshitaka Erlewine)
8
Author URI: http://mitcho.com/
9
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8
@@ -13,7 +13,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4D
13
if (isset($_REQUEST['yarpp_debug']))
14
$yarpp_debug = true;
15
16
- define('YARPP_VERSION','3.2.1b4');
17
define('YARPP_DIR',dirname(__FILE__));
18
// 3.2.1: safer new version checking
19
add_action('wp_ajax_yarpp_version_json', 'yarpp_version_json');
3
Plugin Name: Yet Another Related Posts Plugin
4
Plugin URI: http://mitcho.com/code/yarpp/
5
Description: Returns a list of related entries based on a unique algorithm for display on your blog and RSS feeds. A templating feature allows customization of the display.
6
+ Version: 3.2.1
7
Author: mitcho (Michael Yoshitaka Erlewine)
8
Author URI: http://mitcho.com/
9
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=66G4DATK4999L&item_name=mitcho%2ecom%2fcode%3a%20donate%20to%20Michael%20Yoshitaka%20Erlewine&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&charset=UTF%2d8
13
if (isset($_REQUEST['yarpp_debug']))
14
$yarpp_debug = true;
15
16
+ define('YARPP_VERSION','3.2.1');
17
define('YARPP_DIR',dirname(__FILE__));
18
// 3.2.1: safer new version checking
19
add_action('wp_ajax_yarpp_version_json', 'yarpp_version_json');