From 17248058f3635a184faf52c468bcbd4f0e3e1fba Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Thu, 20 Feb 2014 05:08:13 +0000 Subject: [PATCH] Fixes for hooks documentation wp-includes/nav-menu-template.php. See #26869, #25229 and [25410]. Built from https://develop.svn.wordpress.org/trunk@27201 git-svn-id: http://core.svn.wordpress.org/trunk@27058 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/nav-menu-template.php | 43 +++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php index b7683c3cd3..5d28e5b492 100644 --- a/wp-includes/nav-menu-template.php +++ b/wp-includes/nav-menu-template.php @@ -92,9 +92,11 @@ class Walker_Nav_Menu extends Walker { * * @since 3.0.0 * + * @see wp_nav_menu() + * * @param array $classes The CSS classes that are applied to the menu item's
  • . * @param object $item The current menu item. - * @param array $args An array of arguments. @see wp_nav_menu() + * @param array $args An array of wp_nav_menu() arguments. */ $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) ); $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; @@ -104,9 +106,11 @@ class Walker_Nav_Menu extends Walker { * * @since 3.0.1 * - * @param string The ID that is applied to the menu item's
  • . - * @param object $item The current menu item. - * @param array $args An array of arguments. @see wp_nav_menu() + * @see wp_nav_menu() + * + * @param string $menu_id The ID that is applied to the menu item's
  • . + * @param object $item The current menu item. + * @param array $args An array of wp_nav_menu() arguments. */ $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args ); $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; @@ -124,16 +128,18 @@ class Walker_Nav_Menu extends Walker { * * @since 3.6.0 * + * @see wp_nav_menu() + * * @param array $atts { * The HTML attributes applied to the menu item's , empty strings are ignored. * - * @type string $title The title attribute. - * @type string $target The target attribute. + * @type string $title Title attribute. + * @type string $target Target attribute. * @type string $rel The rel attribute. * @type string $href The href attribute. * } * @param object $item The current menu item. - * @param array $args An array of arguments. @see wp_nav_menu() + * @param array $args An array of wp_nav_menu() arguments. */ $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args ); @@ -161,10 +167,12 @@ class Walker_Nav_Menu extends Walker { * * @since 3.0.0 * + * @see wp_nav_menu() + * * @param string $item_output The menu item's starting HTML output. * @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 array $args An array of wp_nav_menu() arguments. */ $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } @@ -226,7 +234,9 @@ function wp_nav_menu( $args = array() ) { * * @since 3.0.0 * - * @param array $args Arguments from {@see wp_nav_menu()}. + * @see wp_nav_menu() + * + * @param array $args Array of wp_nav_menu() arguments. */ $args = apply_filters( 'wp_nav_menu_args', $args ); $args = (object) $args; @@ -277,7 +287,8 @@ function wp_nav_menu( $args = array() ) { * * @since 3.0.0 * - * @param array The acceptable HTML tags for use as menu containers, defaults as 'div' and 'nav'. + * @param array $tags The acceptable HTML tags for use as menu containers. + * Default is array containing 'div' and 'nav'. */ $allowed_tags = apply_filters( 'wp_nav_menu_container_allowedtags', array( 'div', 'nav' ) ); if ( in_array( $args->container, $allowed_tags ) ) { @@ -341,8 +352,10 @@ function wp_nav_menu( $args = array() ) { * * @since 3.0.0 * + * @see wp_nav_menu() + * * @param string $items The HTML list content for the menu items. - * @param array $args Arguments from {@see wp_nav_menu()}. + * @param array $args Array of wp_nav_menu() arguments. */ $items = apply_filters( 'wp_nav_menu_items', $items, $args ); /** @@ -350,8 +363,10 @@ function wp_nav_menu( $args = array() ) { * * @since 3.0.0 * + * @see wp_nav_menu() + * * @param string $items The HTML list content for the menu items. - * @param array $args Arguments from {@see wp_nav_menu()}. + * @param array $args Array of wp_nav_menu() arguments. */ $items = apply_filters( "wp_nav_menu_{$menu->slug}_items", $items, $args ); @@ -370,8 +385,10 @@ function wp_nav_menu( $args = array() ) { * * @since 3.0.0 * + * @see wp_nav_menu() + * * @param string $nav_menu The HTML content for the navigation menu. - * @param array $args Arguments from {@see wp_nav_menu()}. + * @param array $args Array of wp_nav_menu() arguments. */ $nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args );