[ Index ]

WordPress Cross Reference

title

Body

[close]

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

Navigation Menu template functions

File Size: 633 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Walker_Nav_Menu:: (8 methods):
  start_lvl()
  end_lvl()
  start_el()
  end_el()
  wp_nav_menu()
  _wp_menu_item_classes_by_context()
  walk_nav_menu_tree()
  _nav_menu_item_id_use_once()


Class: Walker_Nav_Menu  - X-Ref

Create HTML list of nav menu items.

start_lvl( &$output, $depth = 0, $args = array()   X-Ref
Starts the list before the elements are added.

param: string $output Passed by reference. Used to append additional content.
param: int    $depth  Depth of menu item. Used for padding.
param: array  $args   An array of arguments. @see wp_nav_menu()

end_lvl( &$output, $depth = 0, $args = array()   X-Ref
Ends the list of after the elements are added.

param: string $output Passed by reference. Used to append additional content.
param: int    $depth  Depth of menu item. Used for padding.
param: array  $args   An array of arguments. @see wp_nav_menu()

start_el( &$output, $item, $depth = 0, $args = array()   X-Ref
Start the element output.

param: string $output Passed by reference. Used to append additional content.
param: object $item   Menu item data object.
param: int    $depth  Depth of menu item. Used for padding.
param: array  $args   An array of arguments. @see wp_nav_menu()
param: int    $id     Current item ID.

end_el( &$output, $item, $depth = 0, $args = array()   X-Ref
Ends the element output, if needed.

param: string $output Passed by reference. Used to append additional content.
param: object $item   Page data object. Not used.
param: int    $depth  Depth of page. Not Used.
param: array  $args   An array of arguments. @see wp_nav_menu()

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

Optional $args contents:

menu - The menu that is desired. Accepts (matching in order) id, slug, name. Defaults to blank.
menu_class - CSS class to use for the ul element which forms the menu. Defaults to 'menu'.
menu_id - The ID that is applied to the ul element which forms the menu. Defaults to the menu slug, incremented.
container - Whether to wrap the ul, and what to wrap it with. Defaults to 'div'.
container_class - the class that is applied to the container. Defaults to 'menu-{menu slug}-container'.
container_id - The ID that is applied to the container. Defaults to blank.
fallback_cb - If the menu doesn't exists, a callback function will fire. Defaults to 'wp_page_menu'. Set to false for no fallback.
before - Text before the link text.
after - Text after the link text.
link_before - Text before the link.
link_after - Text after the link.
echo - Whether to echo the menu or return it. Defaults to echo.
depth - how many levels of the hierarchy are to be included. 0 means all. Defaults to 0.
walker - allows a custom walker to be specified.
theme_location - the location in the theme to be used. Must be registered with register_nav_menu() in order to be selectable by the user.
items_wrap - How the list items should be wrapped. Defaults to a ul with an id and class. Uses printf() format with numbered placeholders.

param: array $args Arguments

_wp_menu_item_classes_by_context( &$menu_items )   X-Ref
Add 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.

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


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




Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu