[wp-trac] [WordPress Trac] #24587: Walker_Page and Walker_Nav_Menu not compatible
WordPress Trac
noreply at wordpress.org
Mon Aug 10 15:17:21 UTC 2015
#24587: Walker_Page and Walker_Nav_Menu not compatible
------------------------------------------+-----------------------------
Reporter: geardev | Owner: johnbillion
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Future Release
Component: Menus | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Changes (by johnbillion):
* keywords: has-patch => needs-patch needs-unit-tests
* owner: => johnbillion
* status: new => accepted
Comment:
I just ran across this bug. What a mess.
[attachment:patch-24587-1.patch] isn't an ideal solution because `$args`
should always be an array (according to the docblocks and its default
value in methods throughout the `Walker` class). However, changing it to
an array will break things that are filtering `nav_menu_css_class`,
`nav_menu_item_id`, `nav_menu_link_attributes`, or
`walker_nav_menu_start_el` and expecting an object. Ugh.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24587#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list