WP_Customize_Color_Control::to_json() WordPress Method
The WP_Customize_Color_Control::to_json() method is used to initialize the color control with values from the database. It sets up the control with the proper values, including the default value.
WP_Customize_Color_Control::to_json() #
Refresh the parameters passed to the JavaScript via JSON.
Source
File: wp-includes/customize/class-wp-customize-color-control.php
public function to_json() { parent::to_json(); $this->json['statuses'] = $this->statuses; $this->json['defaultValue'] = $this->setting->default; $this->json['mode'] = $this->mode; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |