WordPress Version: 4.7
/**
* Retrieve the HTML list content for nav menu items.
*
* @uses Walker_Nav_Menu to create HTML list content.
* @since 3.0.0
*
* @param array $items The menu items, sorted by each menu item's menu order.
* @param int $depth Depth of the item in reference to parents.
* @param stdClass $r An object containing wp_nav_menu() arguments.
* @return string The HTML list content for the 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);
}