WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/05/2020 07:23:25 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct type for $item and $args parameters in Walker_Nav_Menu_Checklist and Walker_Nav_Menu_Edit to match the parent Walker_Nav_Menu` class.

Follow-up to [38559], [45537].

See #24587, #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-walker-nav-menu-edit.php

    r47122 r47189  
    2323     * @since 3.0.0
    2424     *
    25      * @param string $output Passed by reference.
    26      * @param int    $depth  Depth of menu item. Used for padding.
    27      * @param array $args   Not used.
     25     * @param string   $output Passed by reference.
     26     * @param int      $depth  Depth of menu item. Used for padding.
     27     * @param stdClass $args   Not used.
    2828     */
    29     public function start_lvl( &$output, $depth = 0, $args = array() ) {}
     29    public function start_lvl( &$output, $depth = 0, $args = null ) {}
    3030
    3131    /**
     
    3636     * @since 3.0.0
    3737     *
    38      * @param string $output Passed by reference.
    39      * @param int    $depth  Depth of menu item. Used for padding.
    40      * @param array $args   Not used.
     38     * @param string   $output Passed by reference.
     39     * @param int      $depth  Depth of menu item. Used for padding.
     40     * @param stdClass $args   Not used.
    4141     */
    42     public function end_lvl( &$output, $depth = 0, $args = array() ) {}
     42    public function end_lvl( &$output, $depth = 0, $args = null ) {}
    4343
    4444    /**
     
    5050     * @global int $_wp_nav_menu_max_depth
    5151     *
    52      * @param string $output Used to append additional content (passed by reference).
    53      * @param object $item   Menu item data object.
    54      * @param int    $depth  Depth of menu item. Used for padding.
    55      * @param array $args   Not used.
    56      * @param int    $id     Not used.
     52     * @param string   $output Used to append additional content (passed by reference).
     53     * @param WP_Post $item   Menu item data object.
     54     * @param int      $depth  Depth of menu item. Used for padding.
     55     * @param stdClass $args   Not used.
     56     * @param int      $id     Not used.
    5757     */
    58     public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
     58    public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
    5959        global $_wp_nav_menu_max_depth;
    6060        $_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;
Note: See TracChangeset for help on using the changeset viewer.