WPDev.one
Core Class

WP_Customize_Nav_Menu_Item_Setting

class WP_Customize_Nav_Menu_Item_Setting // Constructor: function Object() { [native code] }

Customize Setting to represent a nav_menu.

Methods 14 methods

Method / Return Description
__construct()
void

Constructor.

Parameters: $manager: WP_Customize_Manager, $id: mixed, $args: array
flush_cached_value()
void

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

Parameters: $menu_id: mixed, $menu_item_id: mixed
value()
(array

Get the instance data for a given nav_menu_item setting.

js_value()
(array

Prepares the value for editing on the client.

get_original_title()
string

Get original title.

Parameters: $item: mixed
get_type_label()
string

Get type label.

Parameters: $item: mixed
populate_value()
void

Ensure that the value is fully populated with the necessary properties.

preview()
bool

Handle previewing the setting.

filter_wp_get_nav_menu_items()
WP_Post[]

Filters the wp_get_nav_menu_items() result to supply the previewed menu items.

Parameters: $items: mixed, $menu: mixed, $args: mixed
sort_wp_get_nav_menu_items()
WP_Post[]

Re-apply the tail logic also applied on $items by wp_get_nav_menu_items().

Parameters: $items: mixed, $menu: mixed, $args: mixed
value_as_wp_post_nav_menu_item()
WP_Post

Get the value emulated into a WP_Post and set up as a nav_menu_item.

sanitize()
(array

Sanitize an input.

Parameters: $value: mixed
update()
(null

Creates/updates the nav_menu_item post for this setting.

Parameters: $value: mixed
amend_customize_save_response()
array

Export data for the JS client.

Parameters: $data: mixed

Properties

Property / Type Description
$type
mixed
public
No description available.
$default
mixed
public
No description available.
$transport
mixed
public
No description available.
$post_id
mixed
public
No description available.
$value
mixed
public
No description available.
$previous_post_id
mixed
public
No description available.
$original_nav_menu_term_id
mixed
public
No description available.
$is_updated
mixed
public
No description available.
$update_status
mixed
public
No description available.
$update_error
mixed
public
No description available.

Class Information

Since Version
4.3.0
Source File
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
Advertisement