mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 15:47:38 +02:00
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:
parent
90544d66f2
commit
14c9ea88ea
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
* Filter the arguments for the Custom Menu widget.
|
* Filter the arguments for the Custom Menu widget.
|
||||||
*
|
*
|
||||||
* @since 4.2.0
|
* @since 4.2.0
|
||||||
|
* @since 4.4.0 Added the `$instance` parameter.
|
||||||
*
|
*
|
||||||
* @param array $nav_menu_args {
|
* @param array $nav_menu_args {
|
||||||
* An array of arguments passed to wp_nav_menu() to retrieve a custom menu.
|
* 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 stdClass $nav_menu Nav menu object for the current menu.
|
||||||
* @param array $args Display arguments for the current widget.
|
* @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'];
|
echo $args['after_widget'];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user