walk_nav_menu_tree( array $items, int $depth, stdClass $r )
Retrieve the HTML list content for nav menu items.
Parameters
- $items
-
(Required) The menu items, sorted by each menu item's menu order.
- $depth
-
(Required) Depth of the item in reference to parents.
- $r
-
(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;
$args = array( $items, $depth, $r );
return call_user_func_array( array( $walker, 'walk' ), $args );
}
Changelog
Version | Description |
---|---|
WP-3.0.0 | Introduced. |