WordPress.org

Make WordPress Core

Changeset 32612


Ignore:
Timestamp:
05/26/2015 10:09:26 PM (5 years ago)
Author:
wonderboymusic
Message:

Fix doc blocks for nav-menu*.php files.

See #32444.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu-template.php

    r31168 r32612  
    195195 *
    196196 * @since 3.0.0
     197 *
     198 * @staticvar array $menu_id_slugs
    197199 *
    198200 * @param array $args {
     
    220222 *                                          Uses printf() format with numbered placeholders.
    221223 * }
    222  * @return mixed Menu output if $echo is false, false if there are no items or no menu was found.
     224 * @return object|false|void Menu output if $echo is false, false if there are no items or no menu was found.
    223225 */
    224226function wp_nav_menu( $args = array() ) {
     
    430432 * @access private
    431433 * @since 3.0.0
     434 *
     435 * @global WP_Query   $wp_query
     436 * @global WP_Rewrite $wp_rewrite
    432437 *
    433438 * @param array $menu_items The current menu item objects to which to add the class property information.
     
    652657 * @uses Walker_Nav_Menu to create HTML list content.
    653658 * @since 3.0.0
    654  * @see Walker::walk() for parameters and return description.
     659 *
     660 * @param array  $items
     661 * @param int    $depth
     662 * @param object $r
     663 * @return string
    655664 */
    656665function walk_nav_menu_tree( $items, $depth, $r ) {
     
    658667    $args = array( $items, $depth, $r );
    659668
    660     return call_user_func_array( array($walker, 'walk'), $args );
     669    return call_user_func_array( array( $walker, 'walk' ), $args );
    661670}
    662671
     
    666675 * @since 3.0.1
    667676 * @access private
     677 *
     678 * @staticvar array $used_ids
     679 * @param string $id
     680 * @param object $item
     681 * @return string
    668682 */
    669683function _nav_menu_item_id_use_once( $id, $item ) {
    670684    static $_used_ids = array();
    671     if ( in_array( $item->ID, $_used_ids ) )
     685    if ( in_array( $item->ID, $_used_ids ) ) {
    672686        return '';
     687    }
    673688    $_used_ids[] = $item->ID;
    674689    return $id;
  • trunk/src/wp-includes/nav-menu.php

    r32294 r32612  
    1414 *
    1515 * @param string $menu Menu ID, slug, or name.
    16  * @return mixed false if $menu param isn't supplied or term does not exist, menu object if successful.
     16 * @return object|false False if $menu param isn't supplied or term does not exist, menu object if successful.
    1717 */
    1818function wp_get_nav_menu_object( $menu ) {
     
    6666 * @since 3.0.0
    6767 *
     68 * @global array $_wp_registered_nav_menus
     69 *
    6870 * @param array $locations Associative array of menu location identifiers (like a slug) and descriptive text.
    6971 */
     
    7880/**
    7981 * Unregisters a navigation menu for a theme.
     82 *
     83 * @global array $_wp_registered_nav_menus
    8084 *
    8185 * @param string $location The menu location identifier.
     
    100104 * @since 3.0.0
    101105 *
    102  * @param string $location Menu location identifier, like a slug.
     106 * @param string $location    Menu location identifier, like a slug.
    103107 * @param string $description Menu location descriptive text.
    104108 */
     
    110114 *
    111115 * @since 3.0.0
     116 *
     117 * @global array $_wp_registered_nav_menus
     118 *
    112119 * @return array
    113120 */
     
    135142 *
    136143 * @since 3.0.0
     144 *
    137145 * @param string $location Menu location identifier.
    138146 * @return bool Whether location has a menu.
     
    221229 * @since 3.0.0
    222230 *
    223  * @param int $menu_id The ID of the menu or "0" to create a new menu.
     231 * @param int   $menu_id  The ID of the menu or "0" to create a new menu.
    224232 * @param array $menu_data The array of menu data.
    225233 * @return int|WP_Error Menu ID on success, WP_Error object on failure.
     
    299307 * @since 3.0.0
    300308 *
    301  * @param int $menu_id The ID of the menu. Required. If "0", makes the menu item a draft orphan.
    302  * @param int $menu_item_db_id The ID of the menu item. If "0", creates a new menu item.
    303  * @param array $menu_item_data The menu item's data.
     309 * @param int   $menu_id        The ID of the menu. Required. If "0", makes the menu item a draft orphan.
     310 * @param int   $menu_item_db_id The ID of the menu item. If "0", creates a new menu item.
     311 * @param array $menu_item_data  The menu item's data.
    304312 * @return int|WP_Error The menu item's database ID or WP_Error object on failure.
    305313 */
     
    487495 * @access private
    488496 *
     497 * @global string $_menu_item_sort_prop
     498 *
    489499 * @param object $a The first object to compare
    490500 * @param object $b The second object to compare
     
    523533 */
    524534function _is_valid_nav_menu_item( $item ) {
    525     if ( ! empty( $item->_invalid ) )
    526         return false;
    527 
    528     return true;
     535    return empty( $item->_invalid );
    529536}
    530537
     
    533540 *
    534541 * @since 3.0.0
     542 *
     543 * @global string $_menu_item_sort_prop
     544 * @staticvar array $fetched
    535545 *
    536546 * @param string $menu Menu name, ID, or slug.
    537547 * @param array  $args Optional. Arguments to pass to {@see get_posts()}.
    538  * @return mixed $items Array of menu items, otherwise false.
     548 * @return false|array $items Array of menu items, otherwise false.
    539549 */
    540550function wp_get_nav_menu_items( $menu, $args = array() ) {
     
    783793 * @since 3.0.0
    784794 *
    785  * @param int $object_id The ID of the original object.
     795 * @param int    $object_id  The ID of the original object.
    786796 * @param string $object_type The type of object, such as "taxonomy" or "post_type."
    787  * @param string $taxonomy If $object_type is "taxonomy", $taxonomy is the name of the tax that $object_id belongs to
     797 * @param string $taxonomy    If $object_type is "taxonomy", $taxonomy is the name of the tax that $object_id belongs to
    788798 * @return array The array of menu item IDs; empty array if none;
    789799 */
     
    869879 * @param string $new_status The new status of the post object.
    870880 * @param string $old_status The old status of the post object.
    871  * @param object $post The post object being transitioned from one status to another.
    872  * @return void
     881 * @param object $post       The post object being transitioned from one status to another.
    873882 */
    874883function _wp_auto_add_pages_to_menu( $new_status, $old_status, $post ) {
Note: See TracChangeset for help on using the changeset viewer.