WordPress at a glance
filter is not described

widget_nav_menu_args filter-hook . WP 4.2.0

Filters the arguments for the Navigation Menu widget.


add_filter( 'widget_nav_menu_args', 'filter_function_name_1432', 10, 4 );
function filter_function_name_1432( $nav_menu_args, $nav_menu, $args, $instance ){
	// filter...

	return $nav_menu_args;

An array of arguments passed to wp_nav_menu() to retrieve a navigation menu.

  • $fallback_cb (callable/true/false)
    Callback to fire if the menu doesn't exist.
    Default: ''

  • $menu (mixed)
    Menu ID, slug, or name.
Nav menu object for the current menu.
Display arguments for the current widget.
Array of settings for the current widget.


Since 4.2.0 Introduced.
Since 4.4.0 Added the $instance parameter.

Where the hook is called

wp-includes/widgets/class-wp-nav-menu-widget.php 81
wp_nav_menu( apply_filters( 'widget_nav_menu_args', $nav_menu_args, $nav_menu, $args, $instance ) );

Where in WP core the hook is used

Usage not found!