Related Posts for WordPress - Version 1.6.1

Version Description

Download this release

Release Info

Developer barrykooij
Plugin Icon 128x128 Related Posts for WordPress
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.6.0 to 1.6.1

classes/class-related-post-manager.php CHANGED
@@ -18,7 +18,7 @@ class RP4WP_Related_Post_Manager {
18
 
19
  // Build SQl
20
  $sql = "
21
- SELECT P.`ID`
22
  FROM `" . RP4WP_Related_Word_Manager::get_database_table() . "` O
23
  INNER JOIN `" . RP4WP_Related_Word_Manager::get_database_table() . "` R ON R.`word` = O.`word`
24
  INNER JOIN `" . $wpdb->posts . "` P ON P.`ID` = R.`post_id`
@@ -28,7 +28,7 @@ class RP4WP_Related_Post_Manager {
28
  AND R.`post_id` != %d
29
  AND P.`post_status` = 'publish'
30
  GROUP BY P.`id`
31
- ORDER BY SUM( R.`weight` ) DESC
32
  ";
33
 
34
  // Check & Add Limit
18
 
19
  // Build SQl
20
  $sql = "
21
+ SELECT O.`word`, P.`ID`, P.`post_title`, SUM( R.`weight` ) AS `related_weight`
22
  FROM `" . RP4WP_Related_Word_Manager::get_database_table() . "` O
23
  INNER JOIN `" . RP4WP_Related_Word_Manager::get_database_table() . "` R ON R.`word` = O.`word`
24
  INNER JOIN `" . $wpdb->posts . "` P ON P.`ID` = R.`post_id`
28
  AND R.`post_id` != %d
29
  AND P.`post_status` = 'publish'
30
  GROUP BY P.`id`
31
+ ORDER BY `related_weight` DESC
32
  ";
33
 
34
  // Check & Add Limit
classes/hooks/class-hook-page-install.php CHANGED
@@ -132,6 +132,7 @@ class RP4WP_Hook_Page_Install extends RP4WP_Hook {
132
  // Echo current uncached posts
133
  $related_post_manager = new RP4WP_Related_Post_Manager();
134
  echo "<input type='hidden' id='rp4wp_uncached_posts' value='" . $related_post_manager->get_uncached_post_count() . "' />" . PHP_EOL;
 
135
  ?>
136
  <p style="font-weight: bold;"><?php _e( 'Great! All your posts were successfully cached!', 'related-posts-for-wp' ); ?></p>
137
  <p><?php _e( "You can let me link your posts, based on what I think is related, to each other. And don't worry, if I made a mistake at one of your posts you can easily correct this by editing it manually!", 'related-posts-for-wp' ); ?></p>
132
  // Echo current uncached posts
133
  $related_post_manager = new RP4WP_Related_Post_Manager();
134
  echo "<input type='hidden' id='rp4wp_uncached_posts' value='" . $related_post_manager->get_uncached_post_count() . "' />" . PHP_EOL;
135
+
136
  ?>
137
  <p style="font-weight: bold;"><?php _e( 'Great! All your posts were successfully cached!', 'related-posts-for-wp' ); ?></p>
138
  <p><?php _e( "You can let me link your posts, based on what I think is related, to each other. And don't worry, if I made a mistake at one of your posts you can easily correct this by editing it manually!", 'related-posts-for-wp' ); ?></p>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.relatedpostsforwp.com/
4
  Tags: related posts for wordpress, related posts for wp, simple related posts, easy related posts, related posts, related, relations, internal links, seo, bounce rate
5
  Requires at least: 3.6
6
  Tested up to: 4.0
7
- Stable tag: 1.6.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -88,6 +88,10 @@ There is one custom table created for the post cache, this table will however no
88
 
89
  == Changelog ==
90
 
 
 
 
 
91
  = 1.6.0: September 12, 2014 =
92
  * We're now replacing 'special' characters with their 'normal' equivalent.
93
  * Save the wizard settings to options to improve defaults.
4
  Tags: related posts for wordpress, related posts for wp, simple related posts, easy related posts, related posts, related, relations, internal links, seo, bounce rate
5
  Requires at least: 3.6
6
  Tested up to: 4.0
7
+ Stable tag: 1.6.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
88
 
89
  == Changelog ==
90
 
91
+ = 1.6.1: September 13, 2014 =
92
+ * Fixed a bug that caused the manual post link table to be empty.
93
+ * Added checks to only do certain checks in admin.
94
+
95
  = 1.6.0: September 12, 2014 =
96
  * We're now replacing 'special' characters with their 'normal' equivalent.
97
  * Save the wizard settings to options to improve defaults.
related-posts-for-wp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Related Posts for WordPress
4
  Plugin URI: http://www.relatedpostsforwp.com/
5
  Description: Related Posts for WordPress, the best way to display related posts in WordPress.
6
- Version: 1.6.0
7
  Author: Barry Kooij
8
  Author URI: http://www.barrykooij.com/
9
  License: GPL v3
@@ -26,7 +26,7 @@ class RP4WP {
26
 
27
  private static $instance = null;
28
 
29
- const VERSION = '1.6.0';
30
 
31
  /**
32
  * @var RP4WP_Settings
@@ -104,7 +104,7 @@ class RP4WP {
104
  load_plugin_textdomain( 'related-posts-for-wp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
105
 
106
  // Check if we need to run the installer
107
- if ( get_site_option( RP4WP_Constants::OPTION_DO_INSTALL, false ) ) {
108
 
109
  // Delete do install site option
110
  delete_site_option( RP4WP_Constants::OPTION_DO_INSTALL );
@@ -114,9 +114,11 @@ class RP4WP {
114
  exit;
115
  }
116
 
117
- // Check if we need to display an 'is installing' notice
118
- $is_installing_notice = new RP4WP_Is_Installing_Notice();
119
- $is_installing_notice->check();
 
 
120
 
121
  // Setup settings
122
  $this->settings = new RP4WP_Settings();
3
  Plugin Name: Related Posts for WordPress
4
  Plugin URI: http://www.relatedpostsforwp.com/
5
  Description: Related Posts for WordPress, the best way to display related posts in WordPress.
6
+ Version: 1.6.1
7
  Author: Barry Kooij
8
  Author URI: http://www.barrykooij.com/
9
  License: GPL v3
26
 
27
  private static $instance = null;
28
 
29
+ const VERSION = '1.6.1';
30
 
31
  /**
32
  * @var RP4WP_Settings
104
  load_plugin_textdomain( 'related-posts-for-wp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
105
 
106
  // Check if we need to run the installer
107
+ if ( is_admin() && get_site_option( RP4WP_Constants::OPTION_DO_INSTALL, false ) ) {
108
 
109
  // Delete do install site option
110
  delete_site_option( RP4WP_Constants::OPTION_DO_INSTALL );
114
  exit;
115
  }
116
 
117
+ if ( is_admin() ) {
118
+ // Check if we need to display an 'is installing' notice
119
+ $is_installing_notice = new RP4WP_Is_Installing_Notice();
120
+ $is_installing_notice->check();
121
+ }
122
 
123
  // Setup settings
124
  $this->settings = new RP4WP_Settings();