Menus: Set better default for $args
parameter in Walker_Nav_Menu
methods, to match the documented parameter type.
Props trasweb. Fixes #47524. git-svn-id: https://develop.svn.wordpress.org/trunk@45537 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7283555663
commit
8e7a6b298d
@ -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 = '';
|
||||
|
Loading…
Reference in New Issue
Block a user