Convert docs for `wp_nav_menu()` arguments to a hash notation.

Fixes #27163.

Built from https://develop.svn.wordpress.org/trunk@27222


git-svn-id: http://core.svn.wordpress.org/trunk@27079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-02-21 18:32:15 +00:00
parent f9d5020cb5
commit 44696a60dc
1 changed files with 25 additions and 20 deletions

View File

@ -198,28 +198,33 @@ class Walker_Nav_Menu extends Walker {
/**
* 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.
*
* @since 3.0.0
*
* @param array $args Arguments
* @param array $args {
* Optional. Array of nav menu arguments.
*
* @type string $menu Desired menu. Accepts (matching in order) id, slug, name. Default empty.
* @type string $menu_class CSS class to use for the ul element which forms the menu. Default 'menu'.
* @type string $menu_id The ID that is applied to the ul element which forms the menu.
* Default is the menu slug, incremented.
* @type string $container Whether to wrap the ul, and what to wrap it with. Default 'div'.
* @type string $container_class Class that is applied to the container. Default 'menu-{menu slug}-container'.
* @type string $container_id The ID that is applied to the container. Default empty.
* @type callback|bool $fallback_cb If the menu doesn't exists, a callback function will fire.
* Default is 'wp_page_menu'. Set to false for no fallback.
* @type string $before Text before the link text. Default empty.
* @type string $after Text after the link text. Default empty.
* @type string $link_before Text before the link. Default empty.
* @type string $link_after Text after the link. Default empty.
* @type bool $echo Whether to echo the menu or return it. Default true.
* @type int $depth How many levels of the hierarchy are to be included. 0 means all. Default 0.
* @type string $walker Allows a custom walker class to be specified. Default empty.
* @type string $theme_location Theme location to be used. Must be registered with register_nav_menu()
* in order to be selectable by the user.
* @type string $items_wrap How the list items should be wrapped. Default is a ul with an id and class.
* Uses printf() format with numbered placeholders.
* }
* @return mixed Menu output if $echo is true, false if there are no items or no menu was found.
*/
function wp_nav_menu( $args = array() ) {
static $menu_id_slugs = array();