W3cubDocs

/WordPress

WP_Customize_Panel::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/class-wp-customize-panel.php

public function json() {
		$array                          = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type' ) );
		$array['title']                 = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
		$array['content']               = $this->get_content();
		$array['active']                = $this->active();
		$array['instanceNumber']        = $this->instance_number;
		$array['autoExpandSoleSection'] = $this->auto_expand_sole_section;
		return $array;
	}

Changelog

Version Description
4.1.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_panel/json