[wp-trac] [WordPress Trac] #8673: Missing capability to override
Walker_Page
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 19 01:34:59 GMT 2008
#8673: Missing capability to override Walker_Page
-------------------------+--------------------------------------------------
Reporter: MikeLittle | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.8
Component: Template | Version: 2.7
Severity: normal | Keywords: haspatch
-------------------------+--------------------------------------------------
Summery: '''PATCH''' to add the ability to override Walker_Page and
Walker_PageDropdown.
I noticed that unlike the Comment Walker which can be overridden by a user
supplied object, there is no way to override the page walker (Walker_Page)
or the dropdown page walker (Walker_PageDropdown).
Attached is a patch which adds the ability to supply your own walker
objects to both functions.
It uses the same method as for Walker_Comment (a instantiated class
supplied to the wp_list_pages() or wp_dropdown_pages() function call.
Note: The method of checking for the added parameters was different for
wp_dropdown_pages(), for some reason it does not pass the (fixed)
parameters to walk_page_dropdown_tree() unlike those passed to
walk_page_tree().
--
Ticket URL: <http://trac.wordpress.org/ticket/8673>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list