Make WordPress Core


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

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

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.