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;
	}


Top ↑

Changelog

Changelog
VersionDescription
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.