@@ -56,23 +56,23 @@ |
||
56 | 56 | $min = $debug ? '' : '.min'; |
57 | 57 | |
58 | 58 | // if colorpicker |
59 | - if ( ! is_admin() && isset( $dependencies['wp-color-picker'] ) ) { |
|
59 | + if ( ! is_admin() && isset( $dependencies[ 'wp-color-picker' ] ) ) { |
|
60 | 60 | self::colorpicker_frontend(); |
61 | 61 | } |
62 | 62 | |
63 | 63 | // if file/file_list |
64 | - if ( isset( $dependencies['media-editor'] ) ) { |
|
64 | + if ( isset( $dependencies[ 'media-editor' ] ) ) { |
|
65 | 65 | wp_enqueue_media(); |
66 | 66 | } |
67 | 67 | |
68 | 68 | // if timepicker |
69 | - if ( isset( $dependencies['jquery-ui-datetimepicker'] ) ) { |
|
69 | + if ( isset( $dependencies[ 'jquery-ui-datetimepicker' ] ) ) { |
|
70 | 70 | wp_register_script( 'jquery-ui-datetimepicker', cmb2_utils()->url( 'js/jquery-ui-timepicker-addon.min.js' ), array( 'jquery-ui-slider' ), CMB2_VERSION ); |
71 | 71 | } |
72 | 72 | |
73 | 73 | // if cmb2-wysiwyg |
74 | - $enqueue_wysiwyg = isset( $dependencies['cmb2-wysiwyg'] ) && $debug; |
|
75 | - unset( $dependencies['cmb2-wysiwyg'] ); |
|
74 | + $enqueue_wysiwyg = isset( $dependencies[ 'cmb2-wysiwyg' ] ) && $debug; |
|
75 | + unset( $dependencies[ 'cmb2-wysiwyg' ] ); |
|
76 | 76 | |
77 | 77 | // Enqueue cmb JS |
78 | 78 | wp_enqueue_script( self::$handle, cmb2_utils()->url( "js/cmb2{$min}.js" ), $dependencies, CMB2_VERSION, true ); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | ) ); |
29 | 29 | |
30 | 30 | if ( ! $field->group ) { |
31 | - return $this->rendered( $this->get_wp_editor( $a ) . $a['desc'] ); |
|
31 | + return $this->rendered( $this->get_wp_editor( $a ) . $a[ 'desc' ] ); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | // wysiwyg fields in a group need some special handling. |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | protected function get_wp_editor( $args ) { |
54 | 54 | ob_start(); |
55 | - wp_editor( $args['value'], $args['id'], $args['options'] ); |
|
55 | + wp_editor( $args[ 'value' ], $args[ 'id' ], $args[ 'options' ] ); |
|
56 | 56 | return ob_get_clean(); |
57 | 57 | } |
58 | 58 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $group_id = $this->field->group->id(); |
61 | 61 | $field_id = $this->field->id( true ); |
62 | 62 | $options = $this->field->options(); |
63 | - $options['textarea_name'] = 'cmb2_n_' . $group_id . $field_id; |
|
63 | + $options[ 'textarea_name' ] = 'cmb2_n_' . $group_id . $field_id; |
|
64 | 64 | |
65 | 65 | // Initate the editor with special id/value/name so we can retrieve the options in JS. |
66 | 66 | $editor = $this->get_wp_editor( array( |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | // And put the editor instance in a JS template wrapper. |
84 | 84 | echo '<script type="text/template" id="tmpl-cmb2-wysiwyg-' . $group_id . '-' . $field_id . '">'; |
85 | 85 | // Need to wrap the template in a wrapper div w/ specific data attributes which will be used when adding/removing rows. |
86 | - echo '<div class="cmb2-wysiwyg-inner-wrap" data-iterator="{{ data.iterator }}" data-groupid="'. $group_id .'" data-id="'. $field_id .'">'. $editor .'</div>'; |
|
86 | + echo '<div class="cmb2-wysiwyg-inner-wrap" data-iterator="{{ data.iterator }}" data-groupid="' . $group_id . '" data-id="' . $field_id . '">' . $editor . '</div>'; |
|
87 | 87 | echo '</script>'; |
88 | 88 | } |
89 | 89 |