Related Posts for WordPress - Version 1.9.3

Version Description

Download this release

Release Info

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

Code changes from version 1.9.2 to 1.9.3

classes/class-rp4wp.php CHANGED
@@ -8,7 +8,7 @@ class RP4WP {
8
 
9
  private static $instance = null;
10
 
11
- const VERSION = '1.9.2';
12
 
13
  /**
14
  * @var RP4WP_Settings
8
 
9
  private static $instance = null;
10
 
11
+ const VERSION = '1.9.3';
12
 
13
  /**
14
  * @var RP4WP_Settings
classes/hooks/class-hook-link-related-screen.php CHANGED
@@ -9,6 +9,9 @@ class RP4WP_Hook_Link_Related_Screen extends RP4WP_Hook {
9
 
10
  public function run() {
11
 
 
 
 
12
  $this->handle_create_link();
13
  $this->handle_bulk_link();
14
 
@@ -30,6 +33,19 @@ class RP4WP_Hook_Link_Related_Screen extends RP4WP_Hook {
30
  ) );
31
  }
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  /**
34
  * Check if the current user is allowed to create related posts
35
  */
@@ -133,8 +149,8 @@ class RP4WP_Hook_Link_Related_Screen extends RP4WP_Hook {
133
 
134
  // Catch search string
135
  $search = null;
136
- if ( isset( $_POST['s'] ) && $_POST['s'] != '' ) {
137
- $search = $_POST['s'];
138
  }
139
 
140
  ?>
@@ -145,7 +161,7 @@ class RP4WP_Hook_Link_Related_Screen extends RP4WP_Hook {
145
  </h2>
146
 
147
  <form id="sp-list-table-form" method="post">
148
- <input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
149
  <?php
150
  // Create the link table
151
  $list_table = new RP4WP_Link_Related_Table();
9
 
10
  public function run() {
11
 
12
+ // catch search requests
13
+ $this->catch_search();
14
+
15
  $this->handle_create_link();
16
  $this->handle_bulk_link();
17
 
33
  ) );
34
  }
35
 
36
+ /**
37
+ * Catch post search requests on our manually linking page and do a post to get
38
+ */
39
+ private function catch_search() {
40
+ if ( isset( $_GET['page'] ) && 'rp4wp_link_related' == $_GET['page'] && ! empty( $_POST['s'] ) ) {
41
+
42
+ // post to get solution
43
+ wp_redirect( add_query_arg( 's', $_POST['s'], admin_url( sprintf( 'admin.php?page=rp4wp_link_related&rp4wp_parent=%d&rp4wp_view=%s', absint( $_GET['rp4wp_parent'] ), $_GET['rp4wp_view'] ) ) ), 302 );
44
+
45
+ exit;
46
+ }
47
+ }
48
+
49
  /**
50
  * Check if the current user is allowed to create related posts
51
  */
149
 
150
  // Catch search string
151
  $search = null;
152
+ if ( isset( $_GET['s'] ) && $_GET['s'] != '' ) {
153
+ $search = $_GET['s'];
154
  }
155
 
156
  ?>
161
  </h2>
162
 
163
  <form id="sp-list-table-form" method="post">
164
+ <input type="hidden" name="page" value="<?php esc_attr_e( $_REQUEST['page'] ); ?>" />
165
  <?php
166
  // Create the link table
167
  $list_table = new RP4WP_Link_Related_Table();
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: never5, barrykooij
3
  Donate link: http://www.barrykooij.com/donate/
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.5
7
- Stable tag: 1.9.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -118,6 +118,10 @@ There is one custom table created for the post cache, this table will however no
118
 
119
  == Changelog ==
120
 
 
 
 
 
121
  = 1.9.2: April 18, 2016 =
122
  * Tweak: We're now ignoring all characters that are not letters or numbers from word cache.
123
  * Tweak: Various performance optimizations, props [Danny van Kooten](https://github.com/dannyvankooten).
@@ -280,4 +284,4 @@ There is one custom table created for the post cache, this table will however no
280
  * Initial version
281
 
282
  == Upgrade Notice ==
283
- This version is safe to upgrade. If all of your related posts are linked automatically, we do recommend rerunning the wizard for better results.
3
  Donate link: http://www.barrykooij.com/donate/
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.6.1
7
+ Stable tag: 1.9.3
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
118
 
119
  == Changelog ==
120
 
121
+ = 1.9.3: May 2, 2016 =
122
+ * Tweak: Fixed a bug that caused the search query to reset when navigating through pages on the manual linking page.
123
+ * Tweak: Fixed unescaped page request variable on manual linking page.
124
+
125
  = 1.9.2: April 18, 2016 =
126
  * Tweak: We're now ignoring all characters that are not letters or numbers from word cache.
127
  * Tweak: Various performance optimizations, props [Danny van Kooten](https://github.com/dannyvankooten).
284
  * Initial version
285
 
286
  == Upgrade Notice ==
287
+ This version is safe to upgrade. If all of your related posts are linked automatically, we do recommend rerunning the wizard for better results.
related-posts-for-wp.php CHANGED
@@ -3,9 +3,9 @@
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.9.2
7
- Author: Barry Kooij
8
- Author URI: http://www.barrykooij.com/
9
  License: GPL v3
10
 
11
  This program is free software: you can redistribute it and/or modify
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.9.3
7
+ Author: Never5
8
+ Author URI: http://www.never5.com/
9
  License: GPL v3
10
 
11
  This program is free software: you can redistribute it and/or modify