widget_nav_menu_args

Advertisement

Summery Summery

Filters the arguments for the Navigation Menu widget.

Syntax Syntax

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

Parameters Parameters

$nav_menu_args

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

  • 'fallback_cb'
    (callable|bool) Callback to fire if the menu doesn't exist. Default empty.
  • '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.

Source Source

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

Advertisement

Changelog Changelog

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

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.