WP_Customize_Panel::json()publicWP 4.1.0

Gather the parameters passed to client JavaScript via JSON.

Method of the class: WP_Customize_Panel{}

No Hooks.

Return

Array. The array to be exported to the client as JSON.

Usage

$WP_Customize_Panel = new WP_Customize_Panel();
$WP_Customize_Panel->json();

Changelog

Since 4.1.0 Introduced.

WP_Customize_Panel::json() code WP 6.5.2

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