[wp-trac] [WordPress Trac] #21534: Walker: has_children is only set if $args[0] is an array

WordPress Trac noreply at wordpress.org
Tue Apr 23 02:09:54 UTC 2013


#21534: Walker: has_children is only set if $args[0] is an array
----------------------------------------+-----------------------------
 Reporter:  betzster                    |       Owner:  betzster
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Menus                       |     Version:  3.0
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch commit 3.7-early  |
----------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch => has-patch commit 3.7-early
 * version:  3.4.1 => 3.0
 * milestone:  Awaiting Review => Future Release


Comment:

 Found an explanation in #15214.

 In `wp_nav_menu()`, `$args` is an object: [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/nav-menu-
 template.php#L145 [[BR]]
 Via `walk_nav_menu_tree()`, it ends up being `$args[0]` in
 `Walker::display_element()`.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21534#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list