WP_Customize_Nav_Menu_Section::json() WordPress Method
The WP_Customize_Nav_Menu_Section::json() method is used to return the data for this section in JSON format. This data is used to make changes to the menu section via the Customizer API.
WP_Customize_Nav_Menu_Section::json() #
Get section parameters for JS.
Return
(array) Exported parameters.
Source
File: wp-includes/customize/class-wp-customize-nav-menu-section.php
public function json() { $exported = parent::json(); $exported['menu_id'] = (int) preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id ); return $exported; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |