Completed
Pull Request — master (#44)
by Leon
03:17 queued 01:33
created
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.
includes/class-meta-box-post-type.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			$tax_options = array();
226 226
 			foreach ( $taxonomies as $taxonomy ) {
227 227
 
228
-				$tax_options[ $taxonomy->name ] = $taxonomy->labels->name;
228
+				$tax_options[$taxonomy->name] = $taxonomy->labels->name;
229 229
 
230 230
 			}
231 231
 			return $tax_options;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
 			foreach ( $post_type_objects as $post_type_object ) {
248 248
 				if ( $post_type_object->show_ui && $post_type_object->name !== 'meta_box' ) {
249
-					$post_types[ $post_type_object->name ] = $post_type_object->label;
249
+					$post_types[$post_type_object->name] = $post_type_object->label;
250 250
 				}
251 251
 			}
252 252
 
Please login to merge, or discard this patch.
includes/class-meta-box.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 				$plugins = $wp_list_table->items;
104 104
 				foreach ( array_keys( $plugins ) as $key ) {
105 105
 					if ( in_array( $key, $to_hide, true ) ) {
106
-						unset( $wp_list_table->items[ $key ] );
106
+						unset( $wp_list_table->items[$key] );
107 107
 					}
108 108
 				}
109 109
 			}
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
 			foreach ( $field_options as $option ) {
194 194
 				$opt_arr = explode( ',', $option );
195 195
 				if ( ! isset( $opt_arr[1] ) ) {
196
-					$options[ $option ] = $option;
196
+					$options[$option] = $option;
197 197
 					continue;
198 198
 				}
199
-				$options[ $opt_arr[0] ] = $opt_arr[1];
199
+				$options[$opt_arr[0]] = $opt_arr[1];
200 200
 			}
201 201
 			$this->field_args['options'] = $options;
202 202
 		}
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
 		 * @param array $arg_value A CMB2 field type.
209 209
 		 */
210 210
 		public function add_strpos_arg( $arg_value ) {
211
-			if ( strpos( $this->field['_cmb2_field_type_select'], $arg_value[0] ) !== false && isset( $this->field[ $arg_value[2] ] ) && $this->field[ $arg_value[2] ] !== '' ) {
211
+			if ( strpos( $this->field['_cmb2_field_type_select'], $arg_value[0] ) !== false && isset( $this->field[$arg_value[2]] ) && $this->field[$arg_value[2]] !== '' ) {
212 212
 
213 213
 				if ( is_array( $arg_value[1] ) ) {
214
-					$this->field_args[ $arg_value[1][0] ][ $arg_value[1][1] ] = $this->field[ $arg_value[2] ];
214
+					$this->field_args[$arg_value[1][0]][$arg_value[1][1]] = $this->field[$arg_value[2]];
215 215
 					return;
216 216
 				}
217
-				$this->field_args[ $arg_value[1] ] = $this->field[ $arg_value[2] ];
217
+				$this->field_args[$arg_value[1]] = $this->field[$arg_value[2]];
218 218
 			}
219 219
 		}
220 220
 
@@ -230,10 +230,10 @@  discard block
 block discarded – undo
230 230
 
231 231
 				if ( is_array( $value[1] ) ) {
232 232
 
233
-					$this->field_args[ $value[0] ][ $value[1][0] ] = $this->field[ $value[1][1] ];
233
+					$this->field_args[$value[0]][$value[1][0]] = $this->field[$value[1][1]];
234 234
 					return;
235 235
 				}
236
-				$this->field_args[ $value[0] ] = $this->field[ $value[1] ];
236
+				$this->field_args[$value[0]] = $this->field[$value[1]];
237 237
 			}
238 238
 		}
239 239
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 		 * @return boolean             .
248 248
 		 */
249 249
 		public static function should_add_arg( $field, $field_type, $field_key ) {
250
-			return ( $field['_cmb2_field_type_select'] === $field_type && ( ! empty( $field[ $field_key ] ) && $field[ $field_key ] !== '' ) );
250
+			return ( $field['_cmb2_field_type_select'] === $field_type && ( ! empty( $field[$field_key] ) && $field[$field_key] !== '' ) );
251 251
 		}
252 252
 
253 253
 		/**
Please login to merge, or discard this patch.