Completed
Pull Request — master (#26)
by Leon
03:10
created
includes/class-meta-box-post-type.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 				'not_found'          => __( 'Not found', 'cmb2-admin-extension' ),
72 72
 				'not_found_in_trash' => __( 'Not found in Trash', 'cmb2-admin-extension' ),
73 73
 			);
74
-			$args   = array(
74
+			$args = array(
75 75
 				'label'               => __( 'meta_box', 'cmb2-admin-extension' ),
76 76
 				'description'         => __( 'Create custom meta boxes and fields', 'cmb2-admin-extension' ),
77 77
 				'labels'              => $labels,
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 					'add_upload_file_text'     => 'cmb_hide_field file',
198 198
 					'default_value_text'       => 'default_value',
199 199
 				);
200
-				$classes       = $this->conditionally_add_class( $field->args['id'], $field_classes, $classes );
200
+				$classes = $this->conditionally_add_class( $field->args['id'], $field_classes, $classes );
201 201
 			}
202 202
 			return $classes;
203 203
 		}
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 			$tax_options = array();
213 213
 			foreach ( $taxonomies as $taxonomy ) {
214 214
 
215
-				$tax_options[ $taxonomy->name ] = $taxonomy->labels->name;
215
+				$tax_options[$taxonomy->name] = $taxonomy->labels->name;
216 216
 
217 217
 			}
218 218
 			return $tax_options;
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
 			foreach ( $post_type_objects as $post_type_object ) {
233 233
 				if ( $post_type_object->show_ui && $post_type_object->name !== 'meta_box' ) {
234
-					$post_types[ $post_type_object->name ] = $post_type_object->label;
234
+					$post_types[$post_type_object->name] = $post_type_object->label;
235 235
 				}
236 236
 			}
237 237
 
Please login to merge, or discard this patch.
includes/class-meta-box.php 1 patch
Spacing   +8 added lines, -8 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
 			}
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 				if ( ! isset( $opt_arr[1] ) ) {
195 195
 					continue;
196 196
 				}
197
-				$field_options[ $opt_arr[0] ] = $opt_arr[1];
197
+				$field_options[$opt_arr[0]] = $opt_arr[1];
198 198
 			}
199 199
 			$this->field_args['options'] = $field_options;
200 200
 		}
@@ -206,13 +206,13 @@  discard block
 block discarded – undo
206 206
 		 * @param array $arg_value A CMB2 field type.
207 207
 		 */
208 208
 		public function add_strpos_arg( $arg_value ) {
209
-			if ( strpos( $this->field['_cmb2_field_type_select'], $arg_value[0] ) !== false && isset( $this->field[ $arg_value[2] ] ) && $this->field[ $arg_value[2] ] !== '' ) {
209
+			if ( strpos( $this->field['_cmb2_field_type_select'], $arg_value[0] ) !== false && isset( $this->field[$arg_value[2]] ) && $this->field[$arg_value[2]] !== '' ) {
210 210
 
211 211
 				if ( is_array( $arg_value[1] ) ) {
212
-					$this->field_args[ $arg_value[1][0] ][ $arg_value[1][1] ] = $this->field[ $arg_value[2] ];
212
+					$this->field_args[$arg_value[1][0]][$arg_value[1][1]] = $this->field[$arg_value[2]];
213 213
 					return;
214 214
 				}
215
-				$this->field_args[ $arg_value[1] ] = $this->field[ $arg_value[2] ];
215
+				$this->field_args[$arg_value[1]] = $this->field[$arg_value[2]];
216 216
 			}
217 217
 		}
218 218
 
@@ -228,10 +228,10 @@  discard block
 block discarded – undo
228 228
 
229 229
 				if ( is_array( $value ) ) {
230 230
 
231
-					$this->field_args[ $arg ][ $value[0] ] = $this->field[ $value[1] ];
231
+					$this->field_args[$arg][$value[0]] = $this->field[$value[1]];
232 232
 					return;
233 233
 				}
234
-				$this->field_args[ $arg ] = $this->field[ $value ];
234
+				$this->field_args[$arg] = $this->field[$value];
235 235
 			}
236 236
 		}
237 237
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 		 * @return boolean             .
246 246
 		 */
247 247
 		static function should_add_arg( $field, $field_type, $field_key ) {
248
-			return ( $field['_cmb2_field_type_select'] === $field_type && ( ! empty( $field[ $field_key ] ) && $field[ $field_key ] !== '' ) );
248
+			return ( $field['_cmb2_field_type_select'] === $field_type && ( ! empty( $field[$field_key] ) && $field[$field_key] !== '' ) );
249 249
 		}
250 250
 
251 251
 		/**
Please login to merge, or discard this patch.