Version Description
- Added support for excluding attachments from search results
- Tested up to WP 3.8
Download this release
Release Info
Developer | pronskiy |
Plugin | Search Exclude |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- readme.txt +8 -3
- search-exclude.php +3 -1
readme.txt
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
Contributors: pronskiy
|
3 |
Tags: admin, plugin, search
|
4 |
Requires at least: 3.3
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
-
|
11 |
|
12 |
== Description ==
|
13 |
|
@@ -24,9 +24,14 @@ You can also view the list of all the items that are excluded from search on the
|
|
24 |
== Screenshots ==
|
25 |
|
26 |
1. screenshot-1.png
|
|
|
27 |
|
28 |
== Changelog ==
|
29 |
|
|
|
|
|
|
|
|
|
30 |
= 1.0.2 =
|
31 |
* Fixed: Conflict with Yoast WordPress SEO plugin
|
32 |
|
2 |
Contributors: pronskiy
|
3 |
Tags: admin, plugin, search
|
4 |
Requires at least: 3.3
|
5 |
+
Tested up to: 3.8
|
6 |
+
Stable tag: 1.0.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
+
Hide any post or page from the search results.
|
11 |
|
12 |
== Description ==
|
13 |
|
24 |
== Screenshots ==
|
25 |
|
26 |
1. screenshot-1.png
|
27 |
+
2. screenshot-2.png
|
28 |
|
29 |
== Changelog ==
|
30 |
|
31 |
+
= 1.0.3 =
|
32 |
+
* Added support for excluding attachments from search results
|
33 |
+
* Tested up to WP 3.8
|
34 |
+
|
35 |
= 1.0.2 =
|
36 |
* Fixed: Conflict with Yoast WordPress SEO plugin
|
37 |
|
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.
|
6 |
Author: Roman Pronskiy
|
7 |
Author URI: http://pronskiy.com
|
8 |
*/
|
@@ -37,6 +37,7 @@ class SearchExclude
|
|
37 |
add_action('admin_init', array($this, 'saveOptions') );
|
38 |
add_action('admin_menu', array($this, 'adminMenu'));
|
39 |
add_action('post_updated', array($this, 'postSave'));
|
|
|
40 |
add_action('add_meta_boxes', array($this, 'addMetabox') );
|
41 |
add_filter('pre_get_posts',array($this, 'searchFilter'));
|
42 |
}
|
@@ -141,6 +142,7 @@ class SearchExclude
|
|
141 |
|
142 |
$query = new WP_Query( array(
|
143 |
'post_type' => 'any',
|
|
|
144 |
'post__in' => $excluded,
|
145 |
'order'=>'ASC',
|
146 |
'nopaging' => true,
|
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.3
|
6 |
Author: Roman Pronskiy
|
7 |
Author URI: http://pronskiy.com
|
8 |
*/
|
37 |
add_action('admin_init', array($this, 'saveOptions') );
|
38 |
add_action('admin_menu', array($this, 'adminMenu'));
|
39 |
add_action('post_updated', array($this, 'postSave'));
|
40 |
+
add_action('edit_attachment', array($this, 'postSave'));
|
41 |
add_action('add_meta_boxes', array($this, 'addMetabox') );
|
42 |
add_filter('pre_get_posts',array($this, 'searchFilter'));
|
43 |
}
|
142 |
|
143 |
$query = new WP_Query( array(
|
144 |
'post_type' => 'any',
|
145 |
+
'post_status' => 'any',
|
146 |
'post__in' => $excluded,
|
147 |
'order'=>'ASC',
|
148 |
'nopaging' => true,
|