Version Description
Download this release
Release Info
Developer | pmenard |
Plugin | Simply Exclude |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
- readme.txt +3 -2
- simplyexclude.php +20 -6
- simplyexclude_style_admin_27.css +29 -0
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Paul Menard
|
|
3 |
Donate link: http://www.codehooligans.com
|
4 |
Tags: admin, posts, pages, categories, tags, exclude, include, is_front, is_archive, is_search, is_feed
|
5 |
Requires at least: 2.3
|
6 |
-
Tested up to: 2.
|
7 |
-
Stable tag: 1.7.
|
8 |
|
9 |
== Description ==
|
10 |
|
@@ -55,4 +55,5 @@ At the time (version 1.6.1) the plugin only effects Pages included in the tradit
|
|
55 |
1.6 - 2008-05-22 Fixed various items. Added format display for Categories and Pages to reveal hierarchy, Disable plugin functions when searching in admin. This also corrected a display exclusion bug when showing categories and pages. <br />
|
56 |
1.7 - 2008-05-29 Added Author to the Include/Exclude logic. Now you can exclude Author's Posts from Search, Home, RSS, Archive.
|
57 |
1.7.1 - 2008-07-16 Fixed an issue with WP 2.6 where it automatically decided to unserialize the option data structure.
|
|
|
58 |
</p>
|
3 |
Donate link: http://www.codehooligans.com
|
4 |
Tags: admin, posts, pages, categories, tags, exclude, include, is_front, is_archive, is_search, is_feed
|
5 |
Requires at least: 2.3
|
6 |
+
Tested up to: 2.7
|
7 |
+
Stable tag: 1.7.2
|
8 |
|
9 |
== Description ==
|
10 |
|
55 |
1.6 - 2008-05-22 Fixed various items. Added format display for Categories and Pages to reveal hierarchy, Disable plugin functions when searching in admin. This also corrected a display exclusion bug when showing categories and pages. <br />
|
56 |
1.7 - 2008-05-29 Added Author to the Include/Exclude logic. Now you can exclude Author's Posts from Search, Home, RSS, Archive.
|
57 |
1.7.1 - 2008-07-16 Fixed an issue with WP 2.6 where it automatically decided to unserialize the option data structure.
|
58 |
+
1.7.2 - 2009-02.05 Fixed some PHP warning by checking variable is set. Also added style to 2.7 interface.
|
59 |
</p>
|
simplyexclude.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Simply Exclude
|
|
4 |
Plugin URI: http://www.codehooligans.com/2008/04/27/simply-exclude-plugin/
|
5 |
Description: Provides an interface to selectively exclude/include categories, tags and page from the 4 actions used by WordPress. is_front, is_archive, is_search, is_feed.
|
6 |
Author: Paul Menard
|
7 |
-
Version: 1.7.
|
8 |
Author URI: http://www.codehooligans.com
|
9 |
|
10 |
Revision history
|
@@ -14,6 +14,7 @@ Revision history
|
|
14 |
1.6 - 2008-05-22 Fixed various items. Added format display for Categories and Pages to reveal heirarchy, Disable plugin functions when searching in admin. This also corrected a display exclusion bug when showing categories and pages.
|
15 |
1.7 - 2008-05-29 Added Author to the Include/Exclude logic. Now you can exclude Author's Posts from Search, Home, RSS, Archive.
|
16 |
1.7.1 - 2008-07-16 Fixed an issue with WP 2.6 where it automatically decided to unserialize the option data structure.
|
|
|
17 |
*/
|
18 |
|
19 |
class SimplyExclude
|
@@ -35,7 +36,7 @@ class SimplyExclude
|
|
35 |
$this->wp_version = $wp_version;
|
36 |
$this->in_admin = false;
|
37 |
|
38 |
-
$this->
|
39 |
$this->options_key = "simplyexclude";
|
40 |
|
41 |
$this->se_load_config();
|
@@ -45,7 +46,7 @@ class SimplyExclude
|
|
45 |
// Add our own admin menu
|
46 |
add_action('admin_menu', array(&$this,'se_add_nav'));
|
47 |
|
48 |
-
if ($_REQUEST['page'] == $this->options_key)
|
49 |
add_action('admin_head', array(&$this,'se_admin_head'));
|
50 |
|
51 |
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'activate')
|
@@ -72,7 +73,7 @@ class SimplyExclude
|
|
72 |
$this->in_admin = true;
|
73 |
|
74 |
if (function_exists('add_meta_box')) {
|
75 |
-
add_meta_box($this->
|
76 |
array(&$this,'add_page_exclude_sidebar_dbx'), 'page');
|
77 |
}
|
78 |
else {
|
@@ -274,6 +275,13 @@ class SimplyExclude
|
|
274 |
<link rel="stylesheet" href="<?php echo $this->se_cfg['cfg']['myurl'] ?>/simplyexclude_style_admin.css"
|
275 |
type="text/css" media="screen" />
|
276 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
|
279 |
function se_install()
|
@@ -927,6 +935,7 @@ class SimplyExclude
|
|
927 |
</thead>
|
928 |
<tbody>
|
929 |
<?php
|
|
|
930 |
foreach ($this->default_IsActions['pages'] as $action_key => $action_val)
|
931 |
{
|
932 |
$class = ('alternate' == $class) ? '' : 'alternate';
|
@@ -1026,7 +1035,8 @@ class SimplyExclude
|
|
1026 |
id="pages-<?php echo $action_key ?>-<?php echo $page_id ?>"
|
1027 |
<?php
|
1028 |
|
1029 |
-
if ($this->se_cfg['pages'][$action_key][$page_id]
|
|
|
1030 |
echo "checked='checked' ";
|
1031 |
?> />
|
1032 |
<?php
|
@@ -1291,6 +1301,10 @@ class SimplyExclude
|
|
1291 |
|
1292 |
if ($this->se_cfg['pages'][$action_key][$post->ID] == "on")
|
1293 |
$exclude_page = "yes";
|
|
|
|
|
|
|
|
|
1294 |
|
1295 |
if ($this->wp_version < 2.5)
|
1296 |
{
|
@@ -1304,7 +1318,7 @@ class SimplyExclude
|
|
1304 |
<p><?php
|
1305 |
if ($this->wp_version >= 2.5)
|
1306 |
{
|
1307 |
-
?>Select this option 'Yes' to exclude this page from Searches or visit <a href="<?php echo get_option('siteurl') ?>/wp-admin/
|
1308 |
} ?>
|
1309 |
<select name="se_page_exclude">
|
1310 |
<option value='No' selected><?php echo _e('No'); ?></option>
|
4 |
Plugin URI: http://www.codehooligans.com/2008/04/27/simply-exclude-plugin/
|
5 |
Description: Provides an interface to selectively exclude/include categories, tags and page from the 4 actions used by WordPress. is_front, is_archive, is_search, is_feed.
|
6 |
Author: Paul Menard
|
7 |
+
Version: 1.7.2
|
8 |
Author URI: http://www.codehooligans.com
|
9 |
|
10 |
Revision history
|
14 |
1.6 - 2008-05-22 Fixed various items. Added format display for Categories and Pages to reveal heirarchy, Disable plugin functions when searching in admin. This also corrected a display exclusion bug when showing categories and pages.
|
15 |
1.7 - 2008-05-29 Added Author to the Include/Exclude logic. Now you can exclude Author's Posts from Search, Home, RSS, Archive.
|
16 |
1.7.1 - 2008-07-16 Fixed an issue with WP 2.6 where it automatically decided to unserialize the option data structure.
|
17 |
+
1.7.2 - 2009-02.05 Fixed some PHP warning by checking variable is set. Also added style to 2.7 interface.
|
18 |
*/
|
19 |
|
20 |
class SimplyExclude
|
36 |
$this->wp_version = $wp_version;
|
37 |
$this->in_admin = false;
|
38 |
|
39 |
+
$this->admin_menu_label = "Simply Exclude";
|
40 |
$this->options_key = "simplyexclude";
|
41 |
|
42 |
$this->se_load_config();
|
46 |
// Add our own admin menu
|
47 |
add_action('admin_menu', array(&$this,'se_add_nav'));
|
48 |
|
49 |
+
if ((isset($_REQUEST['page'])) && ($_REQUEST['page'] == $this->options_key))
|
50 |
add_action('admin_head', array(&$this,'se_admin_head'));
|
51 |
|
52 |
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'activate')
|
73 |
$this->in_admin = true;
|
74 |
|
75 |
if (function_exists('add_meta_box')) {
|
76 |
+
add_meta_box($this->options_key, $this->admin_menu_label,
|
77 |
array(&$this,'add_page_exclude_sidebar_dbx'), 'page');
|
78 |
}
|
79 |
else {
|
275 |
<link rel="stylesheet" href="<?php echo $this->se_cfg['cfg']['myurl'] ?>/simplyexclude_style_admin.css"
|
276 |
type="text/css" media="screen" />
|
277 |
<?php
|
278 |
+
if ($this->wp_version >= 2.7)
|
279 |
+
{
|
280 |
+
?>
|
281 |
+
<link rel="stylesheet" href="<?php echo $this->se_cfg['cfg']['myurl'] ?>/simplyexclude_style_admin_27.css"
|
282 |
+
type="text/css" media="screen" />
|
283 |
+
<?php
|
284 |
+
}
|
285 |
}
|
286 |
|
287 |
function se_install()
|
935 |
</thead>
|
936 |
<tbody>
|
937 |
<?php
|
938 |
+
$class = "";
|
939 |
foreach ($this->default_IsActions['pages'] as $action_key => $action_val)
|
940 |
{
|
941 |
$class = ('alternate' == $class) ? '' : 'alternate';
|
1035 |
id="pages-<?php echo $action_key ?>-<?php echo $page_id ?>"
|
1036 |
<?php
|
1037 |
|
1038 |
+
if ((isset($this->se_cfg['pages'][$action_key][$page_id]))
|
1039 |
+
&& ($this->se_cfg['pages'][$action_key][$page_id] == "on"))
|
1040 |
echo "checked='checked' ";
|
1041 |
?> />
|
1042 |
<?php
|
1301 |
|
1302 |
if ($this->se_cfg['pages'][$action_key][$post->ID] == "on")
|
1303 |
$exclude_page = "yes";
|
1304 |
+
else
|
1305 |
+
$exclude_page = "no";
|
1306 |
+
|
1307 |
+
|
1308 |
|
1309 |
if ($this->wp_version < 2.5)
|
1310 |
{
|
1318 |
<p><?php
|
1319 |
if ($this->wp_version >= 2.5)
|
1320 |
{
|
1321 |
+
?>Select this option 'Yes' to exclude this page from Searches or visit <a href="<?php echo get_option('siteurl') ?>/wp-admin/options-general.php?page=simplyexclude&se_admin[action]=edit_pages">Simply Exclude</a> Settings page to mass edit all Pages.<br /><?php
|
1322 |
} ?>
|
1323 |
<select name="se_page_exclude">
|
1324 |
<option value='No' selected><?php echo _e('No'); ?></option>
|
simplyexclude_style_admin_27.css
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#se_admin_nav {
|
2 |
+
background-color: #E4F2FD;
|
3 |
+
border-bottom-color: #C6D9E9;
|
4 |
+
border-bottom-style: solid;
|
5 |
+
border-bottom-width: 1px;
|
6 |
+
padding: 1px 0;
|
7 |
+
margin: 27px 0 0 0;
|
8 |
+
}
|
9 |
+
|
10 |
+
#se_admin_nav ul {
|
11 |
+
height:15px;
|
12 |
+
margin:5px 0 6px;
|
13 |
+
padding:0 0 0 2px;
|
14 |
+
}
|
15 |
+
|
16 |
+
#se_admin_nav ul li {
|
17 |
+
margin: 0 0 0 0;
|
18 |
+
padding:0 0 0 0;
|
19 |
+
}
|
20 |
+
|
21 |
+
#se_admin_nav ul li a {
|
22 |
+
border-width:0px;
|
23 |
+
padding:5px 10px;
|
24 |
+
}
|
25 |
+
|
26 |
+
#se_admin_nav ul li a.current, #se_admin_nav ul li a:hover {
|
27 |
+
border-width:0px;
|
28 |
+
color:#D54E21;
|
29 |
+
}
|