Skip to content

Commit

Permalink
Minor updates for v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pronskiy committed Jun 21, 2014
1 parent 0117f09 commit 8a4988a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ You can also view the list of all the items that are excluded from search on the

### Changelog

#### 1.0.5
* Not excluding items from search results on admin interface

#### 1.0.4
* Fixed links on settings page with list of excluded items
* Tested up to WP 3.9
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Search Exclude ===
Contributors: pronskiy
Contributors: pronskiy, williamdodson
Tags: admin, plugin, search
Requires at least: 3.3
Tested up to: 3.9
Stable tag: 1.0.4
Stable tag: 1.0.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -28,6 +28,9 @@ You can also view the list of all the items that are excluded from search on the

== Changelog ==

= 1.0.5 =
* Not excluding items from search results on admin interface

= 1.0.4 =
* Fixed links on settings page with list of excluded items
* Tested up to WP 3.9
Expand Down
9 changes: 4 additions & 5 deletions search-exclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
/*
Plugin Name: Search Exclude
Description: Exclude any page or post from the WordPress search results by checking off the checkbox.
Version: 1.0.4
Version: 1.0.5
Author: Roman Pronskiy
Author URI: http://pronskiy.com
Plugin URI: http://wordpress.org/plugins/search-exclude/
*/

/*
Expand Down Expand Up @@ -118,10 +119,8 @@ public function adminMenu()

public function searchFilter($query)
{
if(!is_admin()) {
if ($query->is_search) {
$query->set('post__not_in', array_merge($query->get('post__not_in'), $this->getExcluded()));
}
if (!is_admin() && $query->is_search) {
$query->set('post__not_in', array_merge($query->get('post__not_in'), $this->getExcluded()));
}
return $query;
}
Expand Down

0 comments on commit 8a4988a

Please sign in to comment.