walk_nav_menu_tree

Advertisement

Summery Summery

Retrieve the HTML list content for nav menu items.

Syntax Syntax

walk_nav_menu_tree( array $items, int $depth, stdClass $r )

Parameters 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 Return

(string) The HTML list content for the menu items.

Source Source

File: wp-includes/nav-menu-template.php

			// Back compat classes for pages to match wp_page_menu().
			if ( in_array( 'current-menu-parent', $classes, true ) ) {
				$classes[] = 'current_page_parent';
			}
			if ( in_array( 'current-menu-ancestor', $classes, true ) ) {

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Advertisement

Leave a Reply