Make WordPress Core


Ignore:
Timestamp:
02/05/2020 07:23:25 AM (4 years 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-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
Note: See TracChangeset for help on using the changeset viewer.