walk_nav_menu_tree( array $items, int $depth, stdClass $r )
Retrieves the HTML list content for nav menu items.
Parameters
- $items
-
(array) (Required) The menu items, sorted by each menu item's menu order.
- $depth
-
(int) (Required) Depth of the item in reference to parents.
- $r
-
(stdClass) (Required) An object containing wp_nav_menu() arguments.
Return
(string) The HTML list content for the menu items.
Source
File: wp-includes/nav-menu-template.php
function walk_nav_menu_tree( $items, $depth, $r ) { $walker = ( empty( $r->walker ) ) ? new Walker_Nav_Menu : $r->walker; return $walker->walk( $items, $depth, $r ); }
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/walk_nav_menu_tree