apply_filters( 'widget_nav_menu_args', array $nav_menu_args, WP_Term $nav_menu, array $args, array $instance )

Filters the arguments for the Navigation Menu widget.


Parameters

$nav_menu_args

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

  • 'fallback_cb'
    (callable|bool) Callback to fire if the menu doesn't exist. Default empty.<br>
  • 'menu'
    (mixed) Menu ID, slug, or name.<br>

$nav_menu

Nav menu object for the current menu.

$args

Display arguments for the current widget.

$instance

Array of settings for the current widget.


Source

File: wp-includes/widgets/class-wp-nav-menu-widget.php

View on GitHub



Changelog

Changelog
Version Description
4.4.0 Added the $instance parameter.
4.2.0 Introduced.