Exclude Pages - Version 1.3

Version Description

Download this release

Release Info

Developer simonwheatley
Plugin Icon wp plugin Exclude Pages
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

Files changed (2) hide show
  1. exclude_pages.php +2 -4
  2. readme.txt +15 -3
exclude_pages.php CHANGED
@@ -81,7 +81,7 @@ function ep_ancestor_excluded( & $page, & $excluded_ids, & $pages )
81
// Is it the homepage?
82
if ( $parent->ID == 0 ) return false;
83
// Otherwise we have another ancestor to check
84
- return ep_ancestor_excluded( $parent->ID, $excluded_ids, $pages );
85
}
86
87
// Return the portion of the $pages array which refers to the ID passed as $page_id
@@ -190,8 +190,6 @@ function ep_set_option( $name, $value, $description )
190
function ep_admin_sidebar()
191
{
192
$nearest_excluded_ancestor = ep_nearest_excluded_ancestor();
193
- error_log( "Nearest: " . $nearest_excluded_ancestor );
194
- if ( $nearest_excluded_ancestor === false ) error_log("FALSE");
195
echo ' <fieldset id="excludepagediv" class="dbx-box">';
196
echo ' <h3 class="dbx-handle">'.__('Navigation').'</h3>';
197
echo ' <div class="dbx-content">';
@@ -207,7 +205,7 @@ function ep_admin_sidebar()
207
if ( $nearest_excluded_ancestor !== false ) {
208
echo '<div class="exclude_alert">';
209
echo __('An ancestor of this page is excluded, so this page is too. ');
210
- echo '<a href="http://wordpress.test.site/wp-admin/page.php?action=edit&amp;post='.$nearest_excluded_ancestor.'"';
211
echo ' title="'.__('edit the excluded ancestor').'">'.__('Edit ancestor').'</a>.</div>';
212
}
213
echo ' </div></fieldset>';
81
// Is it the homepage?
82
if ( $parent->ID == 0 ) return false;
83
// Otherwise we have another ancestor to check
84
+ return ep_ancestor_excluded( $parent, $excluded_ids, $pages );
85
}
86
87
// Return the portion of the $pages array which refers to the ID passed as $page_id
190
function ep_admin_sidebar()
191
{
192
$nearest_excluded_ancestor = ep_nearest_excluded_ancestor();
193
echo ' <fieldset id="excludepagediv" class="dbx-box">';
194
echo ' <h3 class="dbx-handle">'.__('Navigation').'</h3>';
195
echo ' <div class="dbx-content">';
205
if ( $nearest_excluded_ancestor !== false ) {
206
echo '<div class="exclude_alert">';
207
echo __('An ancestor of this page is excluded, so this page is too. ');
208
+ echo '<a href="page.php?action=edit&amp;post='.$nearest_excluded_ancestor.'"';
209
echo ' title="'.__('edit the excluded ancestor').'">'.__('Edit ancestor').'</a>.</div>';
210
}
211
echo ' </div></fieldset>';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.simonwheatley.co.uk/wordpress-plugins/
4
Tags: get_pages, navigation, menu, exclude pages, hide pages
5
Requires at least: 2.2.3
6
Tested up to: 2.3.1
7
- Stable tag: 1.2
8
9
This plugin adds a checkbox, “include this page in menus”, uncheck this to exclude pages from the
10
page navigation that users see on your site.
@@ -18,13 +18,19 @@ Any issues: [contact me](http://www.simonwheatley.co.uk/contact-me/).
18
19
== Change Log ==
20
21
= v1.2 2007/11/21 =
22
23
- * Enhancement: Child pages of an excluded page are now also hidden. There is also a warning message in the edit screen for any child page with a hidden ancestor, informing the person editing that the page is effectively hidden; a link is provided to edit the ancestor affecting the child page.
24
25
= v1.1 2007/11/10 =
26
27
- * Fix: Pages not created manually using "Write Page" were always excluded from the navigation, meaning the admin has to edit the page to manually include them. Pages created by other plugins are not always included in the navigation, if you want to exclude them (a less common scenario) you have to edit them and uncheck the box. ([Reported by Nudnik](http://wordpress.org/support/topic/140017 "Wordpress forum topic"))
28
29
== Description ==
30
@@ -36,6 +42,12 @@ Pages which are children of excluded pages also do not show up in menu listings.
36
underneath the "include" checkbox allows you to track down which ancestor page is affecting child pages
37
in this way.)
38
39
== Installation ==
40
41
1. Upload `exclude_pages.php` to the `/wp-content/plugins/` directory
4
Tags: get_pages, navigation, menu, exclude pages, hide pages
5
Requires at least: 2.2.3
6
Tested up to: 2.3.1
7
+ Stable tag: 1.3
8
9
This plugin adds a checkbox, “include this page in menus”, uncheck this to exclude pages from the
10
page navigation that users see on your site.
18
19
== Change Log ==
20
21
+ = v1.3 2008/01/02 =
22
+
23
+ * FIXED: Descendant (e.g. child) pages were only being checked to a depth of 1 generation.
24
+ * FIXED: The link to visit the hidden ancestor page from an affected descendant page was hard-coded to my development blog URL. ([Reported by webdragon777](http://wordpress.org/support/topic/147689?replies=1#post-662909 "Wordpress forum topic"))
25
+ * FIXED: Stripped out some stray error logging code.
26
+
27
= v1.2 2007/11/21 =
28
29
+ * ENHANCEMENT: Child pages of an excluded page are now also hidden. There is also a warning message in the edit screen for any child page with a hidden ancestor, informing the person editing that the page is effectively hidden; a link is provided to edit the ancestor affecting the child page.
30
31
= v1.1 2007/11/10 =
32
33
+ * FIXED: Pages not created manually using "Write Page" were always excluded from the navigation, meaning the admin has to edit the page to manually include them. Pages created by other plugins are not always included in the navigation, if you want to exclude them (a less common scenario) you have to edit them and uncheck the box. ([Reported by Nudnik](http://wordpress.org/support/topic/140017 "Wordpress forum topic"))
34
35
== Description ==
36
42
underneath the "include" checkbox allows you to track down which ancestor page is affecting child pages
43
in this way.)
44
45
+ == Requests ==
46
+
47
+ I'm simply noting requests here, I've not necessarily looked into how possible any of these are or how much effort they might require.
48
+
49
+ * BUG REPORT: Pages are also excluded from the "Front page displays:" > "Posts page:" admin menu. (Reported by Ed Foley)
50
+
51
== Installation ==
52
53
1. Upload `exclude_pages.php` to the `/wp-content/plugins/` directory