[wp-trac] [WordPress Trac] #24587: Walker_Page and Walker_Nav_Menu not compatible

WordPress Trac noreply at wordpress.org
Sat Aug 27 11:27:20 UTC 2016


#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:
------------------------------------------+-----------------------------

Comment (by peterwilsoncc):

 In [changeset:"38400"]:
 {{{
 #!CommitTicketReference repository="" revision="38400"
 Unit tests: Enforce $args object in `wp_nav_menu()` & `Walker_Nav_Menu`.

 WordPress always* passes $args to filters as an array of arugments. A
 exception is made in `wp_nav_menu()` and the associated walker where these
 are passed to filters as an object, this has been the case for seven years
 (since [13368]).

 These new tests enforce the use of an object in these filters to ensure
 backward compatibility is maintained.

 See #24587.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24587#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list