Code is Poetry.

WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2017-11-30 23:09:33 +00:00
parent ec6a089f98
commit 8f95800d52
1103 changed files with 105981 additions and 78187 deletions

View File

@@ -47,16 +47,18 @@ class WP_Customize_Code_Editor_Control extends WP_Customize_Control {
* @since 4.9.0
*/
public function enqueue() {
$this->editor_settings = wp_enqueue_code_editor( array_merge(
array(
'type' => $this->code_type,
'codemirror' => array(
'indentUnit' => 2,
'tabSize' => 2,
$this->editor_settings = wp_enqueue_code_editor(
array_merge(
array(
'type' => $this->code_type,
'codemirror' => array(
'indentUnit' => 2,
'tabSize' => 2,
),
),
),
$this->editor_settings
) );
$this->editor_settings
)
);
}
/**
@@ -68,9 +70,9 @@ class WP_Customize_Code_Editor_Control extends WP_Customize_Control {
* @return array Array of parameters passed to the JavaScript.
*/
public function json() {
$json = parent::json();
$json = parent::json();
$json['editor_settings'] = $this->editor_settings;
$json['input_attrs'] = $this->input_attrs;
$json['input_attrs'] = $this->input_attrs;
return $json;
}