Completed
Pull Request — master (#23)
by Juliette
02:33
created
includes/class-meta-box.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
 		 *
208 208
 		 * @param array  $field        Field definition.
209 209
 		 * @param string $field_type   A CMB2 field type.
210
-		 * @param mixed  $option_value Option value.
210
+		 * @param string  $option_value Option value.
211 211
 		 */
212 212
 		static function afo( $field, $field_type, $option_value ) {
213 213
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 				$plugins = $wp_list_table->items;
97 97
 				foreach ( $plugins as $key => $val ) {
98 98
 					if ( in_array( $key, $to_hide, true ) ) {
99
-						unset( $wp_list_table->items[ $key ] );
99
+						unset( $wp_list_table->items[$key] );
100 100
 					}
101 101
 				}
102 102
 			}
@@ -276,11 +276,11 @@  discard block
 block discarded – undo
276 276
 							if ( ! isset( $opt_arr[1] ) ) {
277 277
 								continue;
278 278
 							}
279
-							$field_options[ $opt_arr[0] ] = $opt_arr[1];
279
+							$field_options[$opt_arr[0]] = $opt_arr[1];
280 280
 						}
281 281
 						$field_args['options'] = $field_options;
282 282
 					}
283
-					if ( strpos( $field['_cmb2_field_type_select'], 'tax' ) !== false  && $field['_cmb2_tax_options_radio_inline'] !== '' ) {
283
+					if ( strpos( $field['_cmb2_field_type_select'], 'tax' ) !== false && $field['_cmb2_tax_options_radio_inline'] !== '' ) {
284 284
 						$field_args['taxonomy'] = $field['_cmb2_tax_options_radio_inline'];
285 285
 					}
286 286
 					if ( strpos( $field['_cmb2_field_type_select'], 'tax' ) !== false && isset( $field['_cmb2_no_terms_text'] ) && $field['_cmb2_no_terms_text'] !== '' ) {
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 					if ( isset( $field['_cmb2_none_checkbox'] ) && $field['_cmb2_none_checkbox'] === 'on' && $this->has_options( $field['_cmb2_field_type_select'] ) ) {
308 308
 						$field_args['show_option_none'] = true;
309 309
 					}
310
-					if ( strpos( $field['_cmb2_field_type_select'], 'multicheck' ) !== false  && isset( $field['_cmb2_select_all_checkbox'] ) && $field['_cmb2_select_all_checkbox'] === 'on' ) {
310
+					if ( strpos( $field['_cmb2_field_type_select'], 'multicheck' ) !== false && isset( $field['_cmb2_select_all_checkbox'] ) && $field['_cmb2_select_all_checkbox'] === 'on' ) {
311 311
 						$field_args['select_all_button'] = false;
312 312
 					}
313 313
 					if ( $this->afo( $field, array( 'file' ), '_cmb2_add_upload_file_text' ) ) {
Please login to merge, or discard this patch.
includes/class-meta-box-post-type.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
 		 *
208 208
 		 * @param array  $field        Field definition.
209 209
 		 * @param string $field_type   A CMB2 field type.
210
-		 * @param mixed  $option_value Option value.
210
+		 * @param string  $option_value Option value.
211 211
 		 */
212 212
 		static function afo( $field, $field_type, $option_value ) {
213 213
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 				$plugins = $wp_list_table->items;
198 198
 				foreach ( $plugins as $key => $val ) {
199 199
 					if ( in_array( $key, $to_hide ) ) {
200
-						unset( $wp_list_table->items[ $key ] );
200
+						unset( $wp_list_table->items[$key] );
201 201
 					}
202 202
 				}
203 203
 			}
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 			$tax_options = array();
289 289
 			foreach ( $taxonomies as $taxonomy ) {
290 290
 
291
-				$tax_options[ $taxonomy->name ] = $taxonomy->labels->name;
291
+				$tax_options[$taxonomy->name] = $taxonomy->labels->name;
292 292
 
293 293
 			}
294 294
 			return $tax_options;
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 
310 310
 			foreach ( $post_type_objects as $post_type_object ) {
311 311
 				if ( $post_type_object->show_ui && $post_type_object->name !== 'meta_box' ) {
312
-					$post_types[ $post_type_object->name ] = $post_type_object->label;
312
+					$post_types[$post_type_object->name] = $post_type_object->label;
313 313
 				}
314 314
 			}
315 315
 
@@ -752,11 +752,11 @@  discard block
 block discarded – undo
752 752
 							if ( ! isset( $opt_arr[1] ) ) {
753 753
 								continue;
754 754
 							}
755
-							$field_options[ $opt_arr[0] ] = $opt_arr[1];
755
+							$field_options[$opt_arr[0]] = $opt_arr[1];
756 756
 						}
757 757
 						$field_args['options'] = $field_options;
758 758
 					}
759
-					if ( strpos( $field['_cmb2_field_type_select'], 'tax' ) !== false  && $field['_cmb2_tax_options_radio_inline'] != '' ) {
759
+					if ( strpos( $field['_cmb2_field_type_select'], 'tax' ) !== false && $field['_cmb2_tax_options_radio_inline'] != '' ) {
760 760
 						$field_args['taxonomy'] = $field['_cmb2_tax_options_radio_inline'];
761 761
 					}
762 762
 					if ( strpos( $field['_cmb2_field_type_select'], 'tax' ) !== false && isset( $field['_cmb2_no_terms_text'] ) && $field['_cmb2_no_terms_text'] != '' ) {
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
 					if ( isset( $field['_cmb2_none_checkbox'] ) && $field['_cmb2_none_checkbox'] == 'on' && $this->has_options( $field['_cmb2_field_type_select'] ) ) {
784 784
 						$field_args['show_option_none'] = true;
785 785
 					}
786
-					if ( strpos( $field['_cmb2_field_type_select'], 'multicheck' ) !== false  && isset( $field['_cmb2_select_all_checkbox'] ) && $field['_cmb2_select_all_checkbox'] == 'on' ) {
786
+					if ( strpos( $field['_cmb2_field_type_select'], 'multicheck' ) !== false && isset( $field['_cmb2_select_all_checkbox'] ) && $field['_cmb2_select_all_checkbox'] == 'on' ) {
787 787
 						$field_args['select_all_button'] = false;
788 788
 					}
789 789
 					if ( $this->afo( $field, array( 'file' ), '_cmb2_add_upload_file_text' ) ) {
Please login to merge, or discard this patch.
includes/class-meta-box-settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 			foreach ( $users as $user ) {
114 114
 
115 115
 				if ( user_can( $user, 'update_plugins' ) || user_can( $user, 'install_plugins' ) || user_can( $user, 'delete_plugins' ) || user_can( $user, 'edit_theme_options' ) ) {
116
-					$user_options[ $user->ID ] = $user->display_name;
116
+					$user_options[$user->ID] = $user->display_name;
117 117
 				}
118 118
 			}
119 119
 
Please login to merge, or discard this patch.