WP_Nav_Menu_Widget::update

Advertisement

Summery Summery

Handles updating settings for the current Navigation Menu widget instance.

Syntax Syntax

WP_Nav_Menu_Widget::update( array $new_instance, array $old_instance )

Parameters Parameters

$new_instance

(array) (Required) New settings for this instance as input by the user via WP_Widget::form().

$old_instance

(array) (Required) Old settings for this instance.

Return Return

(array) Updated settings to save.

Source Source

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

		 * @since 4.4.0 Added the `$instance` parameter.
		 *
		 * @param array   $nav_menu_args {
		 *     An array of arguments passed to wp_nav_menu() to retrieve a navigation menu.
		 *
		 *     @type callable|bool $fallback_cb Callback to fire if the menu doesn't exist. Default empty.
		 *     @type mixed         $menu        Menu ID, slug, or name.
		 * }
		 * @param WP_Term $nav_menu      Nav menu object for the current menu.
		 * @param array   $args          Display arguments for the current widget.

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Advertisement

Leave a Reply

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