WP_Customize_Sidebar_Section::json() WordPress Method
The WP_Customize_Sidebar_Section::json() method is used to return a JSON representation of a sidebar section. This is used to make sidebars more easily configurable using the WordPress Customizer.
WP_Customize_Sidebar_Section::json() #
Gather the parameters passed to client JavaScript via JSON.
Return
(array) The array to be exported to the client as JSON.
Source
File: wp-includes/customize/class-wp-customize-sidebar-section.php
public function json() {
$json = parent::json();
$json['sidebarId'] = $this->sidebar_id;
return $json;
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.1.0 | Introduced. |