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

WordPress Trac noreply at wordpress.org
Sun Dec 4 20:12:28 UTC 2016


#24587: Walker_Page and Walker_Nav_Menu not compatible
------------------------------------------------+--------------------------
 Reporter:  geardev                             |       Owner:
     Type:  defect (bug)                        |  peterwilsoncc
 Priority:  normal                              |      Status:  assigned
Component:  Menus                               |   Milestone:  Future
 Severity:  normal                              |  Release
 Keywords:  needs-patch needs-unit-tests close  |     Version:  3.0
                                                |  Resolution:
                                                |     Focuses:
------------------------------------------------+--------------------------
Changes (by peterwilsoncc):

 * keywords:  needs-patch needs-unit-tests => needs-patch needs-unit-tests
     close


Comment:

 I think this is a wontfix.

 There is no fix for the `$args` mismatch without implementing
 `ArrayAccess`, which prevents the use of the `array_merge()` function.
 It's possible to check for objects implementing `ArrayAccess` in
 `wp_parse_args()` but this risks breaking plugins/themes using array
 functions directly.

 Additionally there are other incompatibilities between the Nav and Page
 walkers so fixing the arguments object/array conflict only solves half the
 problem.

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


More information about the wp-trac mailing list