WP_Customize_Nav_Menu_Item_Setting::flush_cached_value()publicWP 4.3.0

Clear the cached value when this nav menu item is updated.

Method of the class: WP_Customize_Nav_Menu_Item_Setting{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Customize_Nav_Menu_Item_Setting = new WP_Customize_Nav_Menu_Item_Setting();
$WP_Customize_Nav_Menu_Item_Setting->flush_cached_value( $menu_id, $menu_item_id );
$menu_id(int) (required)
The term ID for the menu.
$menu_item_id(int) (required)
The post ID for the menu item.

Changelog

Since 4.3.0 Introduced.

WP_Customize_Nav_Menu_Item_Setting::flush_cached_value() code WP 6.6.2

public function flush_cached_value( $menu_id, $menu_item_id ) {
	unset( $menu_id );
	if ( $menu_item_id === $this->post_id ) {
		$this->value = null;
	}
}