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.
Built from https://develop.svn.wordpress.org/trunk@47189


git-svn-id: http://core.svn.wordpress.org/trunk@46989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-05 07:25:05 +00:00
parent c32e05f308
commit 84c43d1863
3 changed files with 29 additions and 29 deletions

View File

@ -32,9 +32,9 @@ class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
* *
* @param string $output Used to append additional content (passed by reference). * @param string $output Used to append additional content (passed by reference).
* @param int $depth Depth of page. Used for padding. * @param int $depth Depth of page. Used for padding.
* @param array $args Not used. * @param stdClass $args Not used.
*/ */
public function start_lvl( &$output, $depth = 0, $args = array() ) { public function start_lvl( &$output, $depth = 0, $args = null ) {
$indent = str_repeat( "\t", $depth ); $indent = str_repeat( "\t", $depth );
$output .= "\n$indent<ul class='children'>\n"; $output .= "\n$indent<ul class='children'>\n";
} }
@ -48,9 +48,9 @@ class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
* *
* @param string $output Used to append additional content (passed by reference). * @param string $output Used to append additional content (passed by reference).
* @param int $depth Depth of page. Used for padding. * @param int $depth Depth of page. Used for padding.
* @param array $args Not used. * @param stdClass $args Not used.
*/ */
public function end_lvl( &$output, $depth = 0, $args = array() ) { public function end_lvl( &$output, $depth = 0, $args = null ) {
$indent = str_repeat( "\t", $depth ); $indent = str_repeat( "\t", $depth );
$output .= "\n$indent</ul>"; $output .= "\n$indent</ul>";
} }
@ -66,12 +66,12 @@ class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
* @global int|string $nav_menu_selected_id * @global int|string $nav_menu_selected_id
* *
* @param string $output Used to append additional content (passed by reference). * @param string $output Used to append additional content (passed by reference).
* @param object $item Menu item data object. * @param WP_Post $item Menu item data object.
* @param int $depth Depth of menu item. Used for padding. * @param int $depth Depth of menu item. Used for padding.
* @param array $args Not used. * @param stdClass $args Not used.
* @param int $id Not used. * @param int $id Not used.
*/ */
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
global $_nav_menu_placeholder, $nav_menu_selected_id; global $_nav_menu_placeholder, $nav_menu_selected_id;
$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1; $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;

View File

@ -24,9 +24,9 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
* *
* @param string $output Passed by reference. * @param string $output Passed by reference.
* @param int $depth Depth of menu item. Used for padding. * @param int $depth Depth of menu item. Used for padding.
* @param array $args Not used. * @param stdClass $args Not used.
*/ */
public function start_lvl( &$output, $depth = 0, $args = array() ) {} public function start_lvl( &$output, $depth = 0, $args = null ) {}
/** /**
* Ends the list of after the elements are added. * Ends the list of after the elements are added.
@ -37,9 +37,9 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
* *
* @param string $output Passed by reference. * @param string $output Passed by reference.
* @param int $depth Depth of menu item. Used for padding. * @param int $depth Depth of menu item. Used for padding.
* @param array $args Not used. * @param stdClass $args Not used.
*/ */
public function end_lvl( &$output, $depth = 0, $args = array() ) {} public function end_lvl( &$output, $depth = 0, $args = null ) {}
/** /**
* Start the element output. * Start the element output.
@ -50,12 +50,12 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
* @global int $_wp_nav_menu_max_depth * @global int $_wp_nav_menu_max_depth
* *
* @param string $output Used to append additional content (passed by reference). * @param string $output Used to append additional content (passed by reference).
* @param object $item Menu item data object. * @param WP_Post $item Menu item data object.
* @param int $depth Depth of menu item. Used for padding. * @param int $depth Depth of menu item. Used for padding.
* @param array $args Not used. * @param stdClass $args Not used.
* @param int $id Not used. * @param int $id Not used.
*/ */
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
global $_wp_nav_menu_max_depth; global $_wp_nav_menu_max_depth;
$_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth; $_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-47188'; $wp_version = '5.4-alpha-47189';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.