Contextual Related Posts - Version 1.8.10.1

Version Description

  • Fixed bugs in 1.8.10: Manual install caused a PHP error; Widget title showed %postname% instead of the Title; Refer the Changelog for more information
Download this release

Release Info

Developer Ajay
Plugin Icon 128x128 Contextual Related Posts
Version 1.8.10.1
Comparing to
See all releases

Code changes from version 1.8.10 to 1.8.10.1

Files changed (2) hide show
  1. contextual-related-posts.php +4 -4
  2. readme.txt +11 -5
contextual-related-posts.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Contextual Related Posts
4
- Version: 1.8.10
5
  Plugin URI: http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/
6
  Description: Displaying a set of related posts on your website or in your feed. Increase reader retention and reduce bounce rates
7
  Author: Ajay D'Souza
@@ -294,7 +294,7 @@ add_filter('the_content_feed', 'ald_crp_rss');
294
  * @access public
295
  * @return string echoed output of related posts
296
  */
297
- function echo_ald_crp( $args ) {
298
  echo ald_crp( $args );
299
  }
300
 
@@ -383,7 +383,7 @@ class WidgetCRP extends WP_Widget
383
  return $instance;
384
  } //ending update
385
  function widget($args, $instance) {
386
- global $wpdb;
387
 
388
  extract($args, EXTR_SKIP);
389
 
@@ -393,7 +393,7 @@ class WidgetCRP extends WP_Widget
393
 
394
  if( ( (is_single()) && (!is_single($exclude_on_post_ids)) ) || ( (is_page()) && (!is_page($exclude_on_post_ids)) ) ) {
395
 
396
- $title = apply_filters('widget_title', empty($instance['title']) ? strip_tags($crp_settings['title']) : $instance['title']);
397
  $limit = $instance['limit'];
398
  if (empty($limit)) $limit = $crp_settings['limit'];
399
 
1
  <?php
2
  /*
3
  Plugin Name: Contextual Related Posts
4
+ Version: 1.8.10.1
5
  Plugin URI: http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/
6
  Description: Displaying a set of related posts on your website or in your feed. Increase reader retention and reduce bounce rates
7
  Author: Ajay D'Souza
294
  * @access public
295
  * @return string echoed output of related posts
296
  */
297
+ function echo_ald_crp( $args = array() ) {
298
  echo ald_crp( $args );
299
  }
300
 
383
  return $instance;
384
  } //ending update
385
  function widget($args, $instance) {
386
+ global $wpdb,$post;
387
 
388
  extract($args, EXTR_SKIP);
389
 
393
 
394
  if( ( (is_single()) && (!is_single($exclude_on_post_ids)) ) || ( (is_page()) && (!is_page($exclude_on_post_ids)) ) ) {
395
 
396
+ $title = apply_filters('widget_title', empty($instance['title']) ? strip_tags(str_replace("%postname%",$post->post_title,$crp_settings['title'])) : $instance['title']);
397
  $limit = $instance['limit'];
398
  if (empty($limit)) $limit = $crp_settings['limit'];
399
 
readme.txt CHANGED
@@ -45,13 +45,20 @@ If you have been using this plugin and find this useful, do consider making a do
45
 
46
  == Upgrade Notice ==
47
 
48
- = 1.8.9.2 =
 
 
 
 
49
  * New features; Modified widget class to `crp_related_widget`; Updated timthumb; Modified format of author name that is displayed;
50
- Check the Changelog for more information
51
 
52
  == Changelog ==
53
 
54
- = 1.8.9.2 =
 
 
 
55
  * New: Limit the numbers of characters of the content being compared. This can give a marginal boost to performance
56
  * New: You can now choose to display the Post title in the Title of the Related posts, by using %postname%
57
  * Modified: Widget class has been changed to `crp_related_widget`
@@ -306,13 +313,12 @@ The plugin uses <a href="http://www.binarymoon.co.uk/projects/timthumb/">timthum
306
 
307
  The following functions are available in case you wish to do a manual install of the posts by editing the theme files.
308
 
309
- **echo_ald_crp($cache=0)**
310
 
311
  Echoes the list of posts wherever you add the this function. You can also use this function to display related posts on any type of page generated by WordPress including homepage and archive pages.
312
 
313
  Usage: `<?php if(function_exists('echo_ald_crp')) echo_ald_crp(); ?>` to your template file where you want the related posts to be displayed.
314
 
315
- From v1.8.9, this function will bypass the cache. If you'd like to cache the output, use the following code: `<?php if(function_exists('echo_ald_crp')) echo_ald_crp(1); ?>`
316
 
317
  **get_crp_posts()**
318
 
45
 
46
  == Upgrade Notice ==
47
 
48
+ = 1.8.10.1 =
49
+ * Fixed bugs in 1.8.10: Manual install caused a PHP error; Widget title showed %postname% instead of the Title;
50
+ Refer the Changelog for more information
51
+
52
+ = 1.8.10 =
53
  * New features; Modified widget class to `crp_related_widget`; Updated timthumb; Modified format of author name that is displayed;
54
+ Refer the Changelog for more information
55
 
56
  == Changelog ==
57
 
58
+ = 1.8.10.1 =
59
+ * Fixed: Manual install caused a PHP error in 1.8.10
60
+
61
+ = 1.8.10 =
62
  * New: Limit the numbers of characters of the content being compared. This can give a marginal boost to performance
63
  * New: You can now choose to display the Post title in the Title of the Related posts, by using %postname%
64
  * Modified: Widget class has been changed to `crp_related_widget`
313
 
314
  The following functions are available in case you wish to do a manual install of the posts by editing the theme files.
315
 
316
+ **echo_ald_crp( $args = array() )**
317
 
318
  Echoes the list of posts wherever you add the this function. You can also use this function to display related posts on any type of page generated by WordPress including homepage and archive pages.
319
 
320
  Usage: `<?php if(function_exists('echo_ald_crp')) echo_ald_crp(); ?>` to your template file where you want the related posts to be displayed.
321
 
 
322
 
323
  **get_crp_posts()**
324