From 8a2daa764885a39727d7291dd43a82e81ece8f7e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 14 Jun 2019 11:26:52 +0000 Subject: [PATCH] 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 --- wp-includes/class-walker-nav-menu.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-walker-nav-menu.php b/wp-includes/class-walker-nav-menu.php index 171243b1b9..06070ed0c8 100644 --- a/wp-includes/class-walker-nav-menu.php +++ b/wp-includes/class-walker-nav-menu.php @@ -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 = ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index 7ef88294db..875d119095 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.