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.

Usage

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

	return $nav_menu_args;
}
$nav_menu_args(array)

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(WP_Term)
Nav menu object for the current menu.
$args(array)
Display arguments for the current widget.
$instance(array)
Array of settings for the current widget.

Notes

  • Since 4.4.0 Added the $instance parameter.

Where the hook is called

WP_Nav_Menu_Widget::widget()
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 the hook is used (in WP core)

Does not used.