[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> nav-menu-template.php (summary)

Nav Menu API: Template functions

File Size: 631 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 wp-includes/class-walker-nav-menu.php

Defines 4 functions

  wp_nav_menu()
  _wp_menu_item_classes_by_context()
  walk_nav_menu_tree()
  _nav_menu_item_id_use_once()

Functions
Functions that are not part of a class:

wp_nav_menu( $args = array()   X-Ref
Displays a navigation menu.

return: void|string|false Void if 'echo' argument is true, menu output if 'echo' is false.
param: array $args {
since: 3.0.0
since: 4.7.0 Added the `item_spacing` argument.
since: 5.5.0 Added the `container_aria_label` argument.

_wp_menu_item_classes_by_context( &$menu_items )   X-Ref
Adds the class property classes for the current context, if applicable.

param: array $menu_items The current menu item objects to which to add the class property information.
since: 3.0.0

walk_nav_menu_tree( $items, $depth, $args )   X-Ref
Retrieves the HTML list content for nav menu items.

return: string The HTML list content for the menu items.
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 $args  An object containing wp_nav_menu() arguments.
since: 3.0.0

_nav_menu_item_id_use_once( $id, $item )   X-Ref
Prevents a menu item ID from being used more than once.

return: string
param: string $id
param: object $item
since: 3.0.1



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1