WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/07/2016 04:14:49 PM (4 years ago)
Author:
johnbillion
Message:

Menus: Correct the docblocks for Walker_Nav_Menu, wp_nav_menu(), and walk_nav_menu_tree().

This corrects the parameter type for the $args and $item parameters passed throughout these functions, class methods, and hooks.

See #24587
See #35206
See #37770

File:
1 edited

Legend:

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

    r38523 r38559  
    8383     *
    8484     * @param string|null $output Nav menu output to short-circuit with. Default null.
    85      * @param object      $args   An object containing wp_nav_menu() arguments.
     85     * @param stdClass    $args   An object containing wp_nav_menu() arguments.
    8686     */
    8787    $nav_menu = apply_filters( 'pre_wp_nav_menu', null, $args );
     
    183183     * @since 3.1.0
    184184     *
    185      * @param array  $sorted_menu_items The menu items, sorted by each menu item's menu order.
    186      * @param object $args              An object containing wp_nav_menu() arguments.
     185     * @param array    $sorted_menu_items The menu items, sorted by each menu item's menu order.
     186     * @param stdClass $args              An object containing wp_nav_menu() arguments.
    187187     */
    188188    $sorted_menu_items = apply_filters( 'wp_nav_menu_objects', $sorted_menu_items, $args );
     
    214214     * @see wp_nav_menu()
    215215     *
    216      * @param string $items The HTML list content for the menu items.
    217      * @param object $args  An object containing wp_nav_menu() arguments.
     216     * @param string   $items The HTML list content for the menu items.
     217     * @param stdClass $args  An object containing wp_nav_menu() arguments.
    218218     */
    219219    $items = apply_filters( 'wp_nav_menu_items', $items, $args );
     
    225225     * @see wp_nav_menu()
    226226     *
    227      * @param string $items The HTML list content for the menu items.
    228      * @param object $args  An object containing wp_nav_menu() arguments.
     227     * @param string   $items The HTML list content for the menu items.
     228     * @param stdClass $args  An object containing wp_nav_menu() arguments.
    229229     */
    230230    $items = apply_filters( "wp_nav_menu_{$menu->slug}_items", $items, $args );
     
    247247     * @see wp_nav_menu()
    248248     *
    249      * @param string $nav_menu The HTML content for the navigation menu.
    250      * @param object $args     An object containing wp_nav_menu() arguments.
     249     * @param string   $nav_menu The HTML content for the navigation menu.
     250     * @param stdClass $args     An object containing wp_nav_menu() arguments.
    251251     */
    252252    $nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args );
     
    496496 * @since 3.0.0
    497497 *
    498  * @param array  $items
    499  * @param int    $depth
    500  * @param object $r
    501  * @return string
     498 * @param array    $items The menu items, sorted by each menu item's menu order.
     499 * @param int      $depth Depth of the item in reference to parents.
     500 * @param stdClass $r     An object containing wp_nav_menu() arguments.
     501 * @return string The HTML list content for the menu items.
    502502 */
    503503function walk_nav_menu_tree( $items, $depth, $r ) {
Note: See TracChangeset for help on using the changeset viewer.