From 14c9ea88ea16748cfc644617259f67ab54af0e17 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 28 Sep 2015 15:31:25 +0000 Subject: [PATCH] Widgets: Pass `$instance` to the `widget_nav_menu_args` filter in the Custom Menu widget. Props walterbarcelos for the initial patch. Fixes #33944. Built from https://develop.svn.wordpress.org/trunk@34662 git-svn-id: http://core.svn.wordpress.org/trunk@34626 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets/class-wp-nav-menu-widget.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index e48c95d995..c91be878da 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34661'; +$wp_version = '4.4-alpha-34662'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-nav-menu-widget.php b/wp-includes/widgets/class-wp-nav-menu-widget.php index 16b08db43a..22ec861076 100644 --- a/wp-includes/widgets/class-wp-nav-menu-widget.php +++ b/wp-includes/widgets/class-wp-nav-menu-widget.php @@ -61,6 +61,7 @@ * Filter the arguments for the Custom Menu widget. * * @since 4.2.0 + * @since 4.4.0 Added the `$instance` parameter. * * @param array $nav_menu_args { * An array of arguments passed to wp_nav_menu() to retrieve a custom menu. @@ -70,8 +71,9 @@ * } * @param stdClass $nav_menu Nav menu object for the current menu. * @param array $args Display arguments for the current widget. + * @param array $instance Array of settings for the current widget. */ - wp_nav_menu( apply_filters( 'widget_nav_menu_args', $nav_menu_args, $nav_menu, $args ) ); + wp_nav_menu( apply_filters( 'widget_nav_menu_args', $nav_menu_args, $nav_menu, $args, $instance ) ); echo $args['after_widget']; }