Passed
Push — trunk ( 8750c2...2608e2 )
by Justin
02:44
created
includes/types/CMB2_Type_Wysiwyg.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		) );
31 31
 
32 32
 		if ( ! $field->group ) {
33
-			return $this->rendered( $this->get_wp_editor( $a ) . $a['desc'] );
33
+			return $this->rendered( $this->get_wp_editor( $a ) . $a[ 'desc' ] );
34 34
 		}
35 35
 
36 36
 		// wysiwyg fields in a group need some special handling.
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 	protected function get_wp_editor( $args ) {
56 56
 		ob_start();
57
-		wp_editor( $args['value'], $args['id'], $args['options'] );
57
+		wp_editor( $args[ 'value' ], $args[ 'id' ], $args[ 'options' ] );
58 58
 		return ob_get_clean();
59 59
 	}
60 60
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		$field_id = $this->field->id( true );
64 64
 		$hash     = $this->field->hash_id();
65 65
 		$options  = $this->field->options();
66
-		$options['textarea_name'] = 'cmb2_n_' . $group_id . $field_id;
66
+		$options[ 'textarea_name' ] = 'cmb2_n_' . $group_id . $field_id;
67 67
 
68 68
 		// Initate the editor with special id/value/name so we can retrieve the options in JS.
69 69
 		$editor = $this->get_wp_editor( array(
Please login to merge, or discard this patch.
includes/CMB2_JS.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,30 +85,30 @@  discard block
 block discarded – undo
85 85
 		$min = $debug ? '' : '.min';
86 86
 
87 87
 		// if colorpicker.
88
-		if ( isset( $dependencies['wp-color-picker'] ) ) {
88
+		if ( isset( $dependencies[ 'wp-color-picker' ] ) ) {
89 89
 			if ( ! is_admin() ) {
90 90
 				self::colorpicker_frontend();
91 91
 			}
92 92
 
93
-			if ( isset( $dependencies['wp-color-picker-alpha'] ) ) {
93
+			if ( isset( $dependencies[ 'wp-color-picker-alpha' ] ) ) {
94 94
 				self::register_colorpicker_alpha();
95 95
 			}
96 96
 		}
97 97
 
98 98
 		// if file/file_list.
99
-		if ( isset( $dependencies['media-editor'] ) ) {
99
+		if ( isset( $dependencies[ 'media-editor' ] ) ) {
100 100
 			wp_enqueue_media();
101 101
 			CMB2_Type_File_Base::output_js_underscore_templates();
102 102
 		}
103 103
 
104 104
 		// if timepicker.
105
-		if ( isset( $dependencies['jquery-ui-datetimepicker'] ) ) {
105
+		if ( isset( $dependencies[ 'jquery-ui-datetimepicker' ] ) ) {
106 106
 			self::register_datetimepicker();
107 107
 		}
108 108
 
109 109
 		// if cmb2-wysiwyg.
110
-		$enqueue_wysiwyg = isset( $dependencies['cmb2-wysiwyg'] ) && $debug;
111
-		unset( $dependencies['cmb2-wysiwyg'] );
110
+		$enqueue_wysiwyg = isset( $dependencies[ 'cmb2-wysiwyg' ] ) && $debug;
111
+		unset( $dependencies[ 'cmb2-wysiwyg' ] );
112 112
 
113 113
 		// Enqueue cmb JS.
114 114
 		wp_enqueue_script( self::$handle, CMB2_Utils::url( "js/cmb2{$min}.js" ), $dependencies, CMB2_VERSION, true );
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
 			),
234 234
 		);
235 235
 
236
-		if ( isset( self::$dependencies['code-editor'] ) && function_exists( 'wp_enqueue_code_editor' ) ) {
237
-			$l10n['defaults']['code_editor'] = wp_enqueue_code_editor( array(
236
+		if ( isset( self::$dependencies[ 'code-editor' ] ) && function_exists( 'wp_enqueue_code_editor' ) ) {
237
+			$l10n[ 'defaults' ][ 'code_editor' ] = wp_enqueue_code_editor( array(
238 238
 				'type' => 'text/html',
239 239
 			) );
240 240
 		}
Please login to merge, or discard this patch.