WordPress开发者和主题制作者的搜索引擎



walk_nav_menu_tree ›

Since3.0.0
已弃用n/a
walk_nav_menu_tree ( $items, $depth, $r )
参数: (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
用户:
  • Walker_Nav_Menu
返回:
  • (string) The HTML list content for the menu items.
定义在:
文档:

Retrieve the HTML list content for nav menu items.



源码

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