Exclude Pages - Version 1.7

Version Description

Download this release

Release Info

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

Code changes from version 1.6 to 1.7

Files changed (2) hide show
  1. exclude_pages.php +5 -4
  2. readme.txt +7 -1
exclude_pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Exclude Pages from Navigation
4
  Plugin URI: http://wordpress.org/extend/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.6
7
  Author: Simon Wheatley
8
  Author URI: http://simonwheatley.co.uk/wordpress/
9
 
@@ -39,10 +39,11 @@ function ep_exclude_pages( & $pages )
39
  // If the URL includes "wp-admin", just return the unaltered list
40
  // This constant, WP_ADMIN, only came into WP on 2007-12-19 17:56:16 rev 6412, i.e. not something we can rely upon unfortunately.
41
  // May as well check it though.
42
- if ( defined( 'WP_ADMIN' ) && WP_ADMIN == true ) return $pages;
43
- // Fall back to checking the URL... let's hope they haven't got a page called wp-admin (probably not)
44
  // SWTODO: Actually, you can create a page with an address of wp-admin (which is then inaccessible), I consider this a bug in WordPress (which I may file a report for, and patch, another time).
45
- if ( strpos( $_SERVER[ 'PHP_SELF' ], 'wp-admin' ) !== false ) return $pages;
 
 
46
  $excluded_ids = ep_get_excluded_ids();
47
  $length = count($pages);
48
  // Ensure we catch all descendant pages, so that if a parent
3
  Plugin Name: Exclude Pages from Navigation
4
  Plugin URI: http://wordpress.org/extend/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
7
  Author: Simon Wheatley
8
  Author URI: http://simonwheatley.co.uk/wordpress/
9
 
39
  // If the URL includes "wp-admin", just return the unaltered list
40
  // This constant, WP_ADMIN, only came into WP on 2007-12-19 17:56:16 rev 6412, i.e. not something we can rely upon unfortunately.
41
  // May as well check it though.
42
+ // Also check the URL... let's hope they haven't got a page called wp-admin (probably not)
 
43
  // SWTODO: Actually, you can create a page with an address of wp-admin (which is then inaccessible), I consider this a bug in WordPress (which I may file a report for, and patch, another time).
44
+ $bail_out = ( ( defined( 'WP_ADMIN' ) && WP_ADMIN == true ) || ( strpos( $_SERVER[ 'PHP_SELF' ], 'wp-admin' ) !== false ) );
45
+ $bail_out = apply_filters( 'ep_admin_bail_out', $bail_out );
46
+ if ( $bail_out ) return $pages;
47
  $excluded_ids = ep_get_excluded_ids();
48
  $length = count($pages);
49
  // Ensure we catch all descendant pages, so that if a parent
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.8.2
7
- Stable tag: 1.6
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.
@@ -20,6 +20,8 @@ It is possible to temporarily pause and resume the effect of Exclude Pages by us
20
  <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
21
  <?php resume_exclude_pages(); ?>`
22
 
 
 
23
  Any issues: [contact me](http://www.simonwheatley.co.uk/contact-me/).
24
 
25
  === Incompatible With ===
@@ -37,6 +39,10 @@ Exclude pages is incompatible with:
37
 
38
  == Change Log ==
39
 
 
 
 
 
40
  = v1.6 2009/6/8 =
41
 
42
  * ENHANCEMENT: You can now turn the Exclude Pages functionality off before showing navigation which you want to be comprehensive (and show pages you've normally hidden). This is done with the new `<?php pause_exclude_pages(); ?>` and `<?php resume_exclude_pages(); ?>` templates tags.
4
  Tags: get_pages, navigation, menu, exclude pages, hide pages
5
  Requires at least: 2.2.3
6
  Tested up to: 2.8.2
7
+ Stable tag: 1.7
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.
20
  <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
21
  <?php resume_exclude_pages(); ?>`
22
 
23
+ Other plugin authors: the plugin does not operate on wp_list_pages while the user is on an admin page, if this is an issue you can take advantage of the `ep_admin_bail_out` filter and create a filter function which returns false to allow Exclude Pages to operate in the admin area.
24
+
25
  Any issues: [contact me](http://www.simonwheatley.co.uk/contact-me/).
26
 
27
  === Incompatible With ===
39
 
40
  == Change Log ==
41
 
42
+ = v1.7 2009/7/29 =
43
+
44
+ * ENHANCEMENT: You can now turn the Exclude Pages functionality off in the admin area through use of a filter (this is mainly of advantage to other plugin and theme author).
45
+
46
  = v1.6 2009/6/8 =
47
 
48
  * ENHANCEMENT: You can now turn the Exclude Pages functionality off before showing navigation which you want to be comprehensive (and show pages you've normally hidden). This is done with the new `<?php pause_exclude_pages(); ?>` and `<?php resume_exclude_pages(); ?>` templates tags.