WP_Customize_Code_Editor_Control::json() WordPress Method

The json() method for the WP_Customize_Code_Editor_Control class allows you to get the editor settings as a JSON object. This can be useful for customizing the editor settings or for creating a custom control that extends the Code Editor control.

WP_Customize_Code_Editor_Control::json() #

Refresh the parameters passed to the JavaScript via JSON.


Description

Top ↑

See also


Top ↑

Return

(array) Array of parameters passed to the JavaScript.


Top ↑

Source

File: wp-includes/customize/class-wp-customize-code-editor-control.php

	public function json() {
		$json                    = parent::json();
		$json['editor_settings'] = $this->editor_settings;
		$json['input_attrs']     = $this->input_attrs;
		return $json;
	}


Top ↑

Changelog

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