diff --git a/controls/code/class-kirki-control-code.php b/controls/code/class-kirki-control-code.php index 1f3d5abbb..593a43e5c 100644 --- a/controls/code/class-kirki-control-code.php +++ b/controls/code/class-kirki-control-code.php @@ -57,6 +57,9 @@ public function enqueue() { wp_register_script( 'codemirror', trailingslashit( Kirki::$url ) . 'assets/vendor/codemirror/lib/codemirror.js', array( 'jquery' ) ); wp_enqueue_script( 'kirki-dynamic-control', trailingslashit( Kirki::$url ) . 'assets/js/dynamic-control.js', array( 'jquery', 'customize-base' ), false, true ); + // Make sure $this->choices['language'] is defined. + $this->choices['language'] = ( ! isset( $this->choices['language'] ) ) ? 'css' : $this->choices['language']; + // If we're using html mode, we'll also need to include the multiplex addon // as well as dependencies for XML, JS, CSS languages. switch ( $this->choices['language'] ) {