Search Exclude - Version 1.0.6

Version Description

  • Fixed search filtering for AJAX requests
Download this release

Release Info

Developer pronskiy
Plugin Icon 128x128 Search Exclude
Version 1.0.6
Comparing to
See all releases

Code changes from version 1.0.5 to 1.0.6

Files changed (2) hide show
  1. readme.txt +5 -2
  2. search-exclude.php +2 -2
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Search Exclude ===
2
- Contributors: pronskiy, williamdodson
3
  Tags: admin, plugin, search
4
  Requires at least: 3.3
5
  Tested up to: 3.9
6
- Stable tag: 1.0.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -28,6 +28,9 @@ You can also view the list of all the items that are excluded from search on the
28
 
29
  == Changelog ==
30
 
 
 
 
31
  = 1.0.5 =
32
  * Not excluding items from search results on admin interface
33
 
1
  === Search Exclude ===
2
+ Contributors: pronskiy, williamdodson, stevelock
3
  Tags: admin, plugin, search
4
  Requires at least: 3.3
5
  Tested up to: 3.9
6
+ Stable tag: 1.0.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
28
 
29
  == Changelog ==
30
 
31
+ = 1.0.6 =
32
+ * Fixed search filtering for AJAX requests
33
+
34
  = 1.0.5 =
35
  * Not excluding items from search results on admin interface
36
 
search-exclude.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Search Exclude
4
  Description: Exclude any page or post from the WordPress search results by checking off the checkbox.
5
- Version: 1.0.5
6
  Author: Roman Pronskiy
7
  Author URI: http://pronskiy.com
8
  Plugin URI: http://wordpress.org/plugins/search-exclude/
@@ -119,7 +119,7 @@ class SearchExclude
119
 
120
  public function searchFilter($query)
121
  {
122
- if (!is_admin() && $query->is_search) {
123
  $query->set('post__not_in', array_merge($query->get('post__not_in'), $this->getExcluded()));
124
  }
125
  return $query;
2
  /*
3
  Plugin Name: Search Exclude
4
  Description: Exclude any page or post from the WordPress search results by checking off the checkbox.
5
+ Version: 1.0.6
6
  Author: Roman Pronskiy
7
  Author URI: http://pronskiy.com
8
  Plugin URI: http://wordpress.org/plugins/search-exclude/
119
 
120
  public function searchFilter($query)
121
  {
122
+ if ((!is_admin() || (defined('DOING_AJAX') && DOING_AJAX)) && $query->is_search) {
123
  $query->set('post__not_in', array_merge($query->get('post__not_in'), $this->getExcluded()));
124
  }
125
  return $query;