wppaste
WordPress

WP_Customize_Nav_Menu_Item_Setting

Since
4.3.0
Source
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php:20
Customize Setting to represent a nav_menu.

Description

Subclass of WP_Customize_Setting to represent a nav_menu taxonomy term, and the IDs for the nav_menu_items associated with the nav menu.

Compatibility

WordPress
since 4.3.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 8

Every hook that fires from inside WP_Customize_Nav_Menu_Item_Setting, in the order it appears in the class, grouped by the method that fires it.

Properties · 10

$typestringpublic
Setting type.
$defaultarraypublic
Default setting value.
$transportstringpublic
Default transport.
$post_idintpublic
The post ID represented by this setting instance. This is the db_id.
$valuearray|nullprotected
Storage of pre-setup menu item to prevent wasted calls to wp_setup_nav_menu_item().
$previous_post_idintpublic
Previous (placeholder) post ID used before creating a new menu item.
$original_nav_menu_term_idintpublic
When previewing or updating a menu item, this stores the previous nav_menu_term_id which ensures that we can apply the proper filters.
$is_updatedboolprotected
Whether or not update() was called.
$update_statusstringpublic
Status for calling the update method, used in customize_save_response filter.
$update_errorWP_Errorpublic
Any error object returned by wp_update_nav_menu_item() when setting is updated.

Methods · 14

Changelog

Introduced in 4.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.