WordPress.org

Make WordPress Core

Changeset 47189


Ignore:
Timestamp:
02/05/2020 07:23:25 AM (15 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.

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

Legend:

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

    r47122 r47189  
    3131     * @since 3.0.0
    3232     *
    33      * @param string $output Used to append additional content (passed by reference).
    34      * @param int    $depth  Depth of page. Used for padding.
    35      * @param array $args   Not used.
     33     * @param string   $output Used to append additional content (passed by reference).
     34     * @param int      $depth  Depth of page. Used for padding.
     35     * @param stdClass $args   Not used.
    3636     */
    37     public function start_lvl( &$output, $depth = 0, $args = array() ) {
     37    public function start_lvl( &$output, $depth = 0, $args = null ) {
    3838        $indent  = str_repeat( "\t", $depth );
    3939        $output .= "\n$indent<ul class='children'>\n";
     
    4747     * @since 3.0.0
    4848     *
    49      * @param string $output Used to append additional content (passed by reference).
    50      * @param int    $depth  Depth of page. Used for padding.
    51      * @param array $args   Not used.
     49     * @param string   $output Used to append additional content (passed by reference).
     50     * @param int      $depth  Depth of page. Used for padding.
     51     * @param stdClass $args   Not used.
    5252     */
    53     public function end_lvl( &$output, $depth = 0, $args = array() ) {
     53    public function end_lvl( &$output, $depth = 0, $args = null ) {
    5454        $indent  = str_repeat( "\t", $depth );
    5555        $output .= "\n$indent</ul>";
     
    6666     * @global int|string $nav_menu_selected_id
    6767     *
    68      * @param string $output Used to append additional content (passed by reference).
    69      * @param object $item   Menu item data object.
    70      * @param int    $depth  Depth of menu item. Used for padding.
    71      * @param array $args   Not used.
    72      * @param int    $id     Not used.
     68     * @param string   $output Used to append additional content (passed by reference).
     69     * @param WP_Post $item   Menu item data object.
     70     * @param int      $depth  Depth of menu item. Used for padding.
     71     * @param stdClass $args   Not used.
     72     * @param int      $id     Not used.
    7373     */
    74     public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
     74    public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
    7575        global $_nav_menu_placeholder, $nav_menu_selected_id;
    7676
  • 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.