A WordPress-centric search engine for devs and theme authors



walk_nav_menu_tree ›

Since3.0.0
Deprecatedn/a
walk_nav_menu_tree ( $items, $depth, $r )
Parameters: (3)
  • (array) $items The menu items, sorted by each menu item's menu order.
    Required: Yes
  • (int) $depth Depth of the item in reference to parents.
    Required: Yes
  • (stdClass) $r An object containing wp_nav_menu() arguments.
    Required: Yes
Uses:
  • Walker_Nav_Menu
Returns:
  • (string) The HTML list content for the menu items.
Defined at:
Codex:

Retrieve the HTML list content for nav menu items.



Source

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 );
}