This commit is contained in:
Alexander Agnarson 2020-02-25 18:04:54 +01:00
parent 62def2a89b
commit 7ad333b360
167 changed files with 2955 additions and 2493 deletions

View file

@ -5,7 +5,7 @@
* @package Kirki
* @subpackage Controls
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
* @license https://opensource.org/licenses/MIT
* @license https://opensource.org/licenses/MIT
* @since 2.2.7
*/
@ -96,6 +96,17 @@ class Kirki_Field_Code extends Kirki_Field {
if ( ! isset( $this->editor_settings['codemirror']['mode'] ) ) {
$this->editor_settings['codemirror']['mode'] = $language;
}
if ( 'text/x-scss' === $this->editor_settings['codemirror']['mode'] ) {
$this->editor_settings['codemirror'] = array_merge(
$this->editor_settings['codemirror'],
array(
'lint' => false,
'autoCloseBrackets' => true,
'matchBrackets' => true,
)
);
}
}
/**