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
This commit is contained in:
Drew Jaynes 2015-09-28 15:31:25 +00:00
parent 90544d66f2
commit 14c9ea88ea
2 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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'];
}