Menus: Set better default for `$args` parameter in `Walker_Nav_Menu` methods, to match the documented parameter type.

Props trasweb.
Fixes #47524.
Built from https://develop.svn.wordpress.org/trunk@45537


git-svn-id: http://core.svn.wordpress.org/trunk@45348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-06-14 11:26:52 +00:00
parent 0239fe6d10
commit 8a2daa7648
2 changed files with 5 additions and 5 deletions

View File

@ -50,7 +50,7 @@ class Walker_Nav_Menu extends Walker {
* @param int $depth Depth of menu item. Used for padding.
* @param stdClass $args An object of wp_nav_menu() arguments.
*/
public function start_lvl( &$output, $depth = 0, $args = array() ) {
public function start_lvl( &$output, $depth = 0, $args = null ) {
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
$t = '';
$n = '';
@ -89,7 +89,7 @@ class Walker_Nav_Menu extends Walker {
* @param int $depth Depth of menu item. Used for padding.
* @param stdClass $args An object of wp_nav_menu() arguments.
*/
public function end_lvl( &$output, $depth = 0, $args = array() ) {
public function end_lvl( &$output, $depth = 0, $args = null ) {
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
$t = '';
$n = '';
@ -115,7 +115,7 @@ class Walker_Nav_Menu extends Walker {
* @param stdClass $args An object of wp_nav_menu() arguments.
* @param int $id Current item ID.
*/
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
$t = '';
$n = '';
@ -259,7 +259,7 @@ class Walker_Nav_Menu extends Walker {
* @param int $depth Depth of page. Not Used.
* @param stdClass $args An object of wp_nav_menu() arguments.
*/
public function end_el( &$output, $item, $depth = 0, $args = array() ) {
public function end_el( &$output, $item, $depth = 0, $args = null ) {
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
$t = '';
$n = '';

View File

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