On this page
WP_Customize_Nav_Menu_Section::json(): array
Get section parameters for JS.
Return
array Exported parameters.
Source
File: wp-includes/customize/class-wp-customize-nav-menu-section.php. View all references
public function json() {
$exported = parent::json();
$exported['menu_id'] = (int) preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id );
return $exported;
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Customize_Section::json() wp-includes/class-wp-customize-section.php | Gather the parameters passed to client JavaScript via JSON. |
Changelog
| Version | Description |
|---|---|
| 4.3.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_nav_menu_section/json