Support » Fixing WordPress » an issue in walk_nav_menu_tree

  • when calling walk_nav_menu_tree from wp_nav_menu in file wp-includes/nav-menu-template.php , it sends $args argument as object, but in Walker->display_element method when check this argument for adding “has_children” option, it’s condition is ‘is_array’, so “has_children” option is not added. and when adding a filter for “nav_menu_link_attributes”, you can’t detect it has children or not.

  • The topic ‘an issue in walk_nav_menu_tree’ is closed to new replies.