[wp-trac] [WordPress Trac] #10977: wp_list_pages() puts leading comma in exclude string
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 19 11:17:59 UTC 2009
#10977: wp_list_pages() puts leading comma in exclude string
--------------------------+-------------------------------------------------
Reporter: kevinB | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: 2.9
Component: Template | Version: 2.8.4
Severity: minor | Keywords:
--------------------------+-------------------------------------------------
When called with no 'exclude' argument, wp_list_pages() passes an array
with a nullstring element to the filter 'list_pages_excludes'. If a
plugin then adds at least one more element to that array, the result is a
leading comma in the 'exclude' argument string which is passed to
get_pages() and walk_page_tree().
This misplaced comma does not affect WP core behavior. But if a plugin
which filters 'get_pages' copies the 'exclude' argument to 'exclude_tree'
(logical enough if depth=1 is also passed) and mimics core handling of
that argument, the result is exclusion of the Main Page (ID zero) and all
its children.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10977>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list