WP_Customize_Nav_Menu_Item_Control::json() WordPress Method
The WP_Customize_Nav_Menu_Item_Control::json() method is used to generate a JSON representation of a given menu item. This is useful for creating custom menu item controls in the WordPress Customizer.
WP_Customize_Nav_Menu_Item_Control::json() #
Return parameters for this control.
Return
(array) Exported parameters.
Source
File: wp-includes/customize/class-wp-customize-nav-menu-item-control.php
public function json() { $exported = parent::json(); $exported['menu_item_id'] = $this->setting->post_id; return $exported; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |