WP_Customize_Partial::json() WordPress Method

The WP_Customize_Partial::json() method is used to return the partial as a JSON object. This is used in the Customizer JavaScript API.

WP_Customize_Partial::json() #

Retrieves the data to export to the client via JSON.


Return

(array) Array of parameters passed to the JavaScript.


Top ↑

Source

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

	public function json() {
		$exports = array(
			'settings'           => $this->settings,
			'primarySetting'     => $this->primary_setting,
			'selector'           => $this->selector,
			'type'               => $this->type,
			'fallbackRefresh'    => $this->fallback_refresh,
			'containerInclusive' => $this->container_inclusive,
		);
		return $exports;
	}

Top ↑

Changelog

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