Retrieve the HTML list content for nav menu items.

Signature

walk_nav_menu_tree( $items, $depth, $r )
items
 (array) The menu items, sorted by each menu item's menu order.
depth
 (int) Depth of the item in reference to parents.
r
 (stdClass) An object containing wp_nav_menu() arguments.

Return

(string) The HTML list content for the 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 );
}
WP Trac GitHub

Link here