WP_Customize_Nav_Menu_Setting::update

SummerySummery

Create/update the nav_menu term for this setting.

Syntax

WP_Customize_Nav_Menu_Setting::update( array|false $value )

DescriptionDescription

Any created menus will have their assigned term IDs exported to the client via the ‘customize_save_response’ filter. Likewise, any errors will be exported to the client via the customize_save_response() filter.

To delete a menu, the client can send false as the value.

ParametersParameters

$value

(array|false) (Required) The value to update. Note that slug cannot be updated via wp_update_nav_menu_object(). If false, then the menu will be deleted entirely.

  • 'name'
    (string) The name of the menu to save.
  • 'description'
    (string) The term description. Default empty string.
  • 'parent'
    (int) The id of the parent term. Default 0.
  • 'auto_add'
    (bool) Whether pages will auto_add to this menu. Default false.

ReturnReturn

(null|void)

SourceSource

File: wp-includes/customize/class-wp-customize-nav-menu-setting.php


			

ChangelogChangelog

Changelog
Version Description
4.3.0 Introduced.

See alsoSee also

Scroll to Top