Version Description
Download this release
Release Info
Developer | simonwheatley |
Plugin | Exclude Pages |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- exclude_pages.php +8 -1
- readme.txt +7 -1
exclude_pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Exclude Pages from Navigation
|
4 |
Plugin URI: http://www.simonwheatley.co.uk/wordpress-plugins/exclude-pages/
|
5 |
Description: Provides a checkbox on the editing page which you can check to exclude pages from the primary navigation. IMPORTANT NOTE: This will remove the pages from any "consumer" side page listings, which may not be limited to your page navigation listings.
|
6 |
-
Version: 1.
|
7 |
Author: Simon Wheatley
|
8 |
|
9 |
Copyright 2007 Simon Wheatley
|
@@ -85,6 +85,12 @@ function ep_update_exclusions( $post_ID )
|
|
85 |
{
|
86 |
// Bang (!) to reverse the polarity of the boolean, turning include into exclude
|
87 |
$exclude_this_page = ! (bool) $_POST['ep_include_this_page'];
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
$excluded_ids = ep_get_excluded_ids();
|
89 |
// If we need to EXCLUDE the page from the navigation...
|
90 |
if ( $exclude_this_page ) {
|
@@ -130,6 +136,7 @@ END;
|
|
130 |
echo <<<END
|
131 |
/>
|
132 |
Include this page in menus</label>
|
|
|
133 |
</div>
|
134 |
</fieldset>
|
135 |
END;
|
3 |
Plugin Name: Exclude Pages from Navigation
|
4 |
Plugin URI: http://www.simonwheatley.co.uk/wordpress-plugins/exclude-pages/
|
5 |
Description: Provides a checkbox on the editing page which you can check to exclude pages from the primary navigation. IMPORTANT NOTE: This will remove the pages from any "consumer" side page listings, which may not be limited to your page navigation listings.
|
6 |
+
Version: 1.1
|
7 |
Author: Simon Wheatley
|
8 |
|
9 |
Copyright 2007 Simon Wheatley
|
85 |
{
|
86 |
// Bang (!) to reverse the polarity of the boolean, turning include into exclude
|
87 |
$exclude_this_page = ! (bool) $_POST['ep_include_this_page'];
|
88 |
+
// SWTODO: Also check for a hidden var, which confirms that this checkbox was present
|
89 |
+
// If hidden var not present, then default to including the page in the nav (i.e. bomb out here rather
|
90 |
+
// than add the page ID to the list of IDs to exclude)
|
91 |
+
$ctrl_present = (bool) @ $_POST['ep_ctrl_present'];
|
92 |
+
if ( ! $ctrl_present ) return;
|
93 |
+
|
94 |
$excluded_ids = ep_get_excluded_ids();
|
95 |
// If we need to EXCLUDE the page from the navigation...
|
96 |
if ( $exclude_this_page ) {
|
136 |
echo <<<END
|
137 |
/>
|
138 |
Include this page in menus</label>
|
139 |
+
<input type="hidden" name="ep_ctrl_present" value="1" />
|
140 |
</div>
|
141 |
</fieldset>
|
142 |
END;
|
readme.txt
CHANGED
@@ -4,11 +4,17 @@ 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
|
7 |
-
Stable tag: 1.
|
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.
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
== Description ==
|
13 |
|
14 |
This plugin adds a checkbox, “include this page in menus”, which is checked by default. If you uncheck
|
4 |
Tags: get_pages, navigation, menu, exclude pages, hide pages
|
5 |
Requires at least: 2.2.3
|
6 |
Tested up to: 2.3
|
7 |
+
Stable tag: 1.1
|
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.
|
11 |
|
12 |
+
== Change Log ==
|
13 |
+
|
14 |
+
= v1.1 2007/11/10 =
|
15 |
+
|
16 |
+
* 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"))
|
17 |
+
|
18 |
== Description ==
|
19 |
|
20 |
This plugin adds a checkbox, “include this page in menus”, which is checked by default. If you uncheck
|