WP_Customize_Setting::json() WordPress Method

The WP_Customize_Setting::json() method is used to return the json representation of a Customize Setting. This is useful for creating settings that are not tied to specific controls.

WP_Customize_Setting::json() #

Retrieves the data to export to the client via JSON.


Return

(array) Array of parameters passed to JavaScript.


Top ↑

Source

File: wp-includes/class-wp-customize-setting.php

	public function json() {
		return array(
			'value'     => $this->js_value(),
			'transport' => $this->transport,
			'dirty'     => $this->dirty,
			'type'      => $this->type,
		);
	}


Top ↑

Changelog

Changelog
VersionDescription
4.6.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.