Completed
Pull Request — trunk (#593)
by
unknown
13:03
created
includes/CMB2_hookup.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -243,14 +243,14 @@  discard block
 block discarded – undo
243 243
 				}
244 244
 
245 245
 				foreach ( $this->cmb->prop( 'fields' ) as $meta_box => $field ) {
246
-					if ( isset( $field['taxonomy'] ) && ! empty( $field['remove_default'] ) ) {
247
-						if ( ! is_taxonomy( $field['taxonomy'] ) ) {
246
+					if ( isset( $field[ 'taxonomy' ] ) && ! empty( $field[ 'remove_default' ] ) ) {
247
+						if ( ! is_taxonomy( $field[ 'taxonomy' ] ) ) {
248 248
 							continue;
249 249
 						}
250
-						if ( is_taxonomy_hierarchical( $field['taxonomy'] ) ) {
251
-							remove_meta_box( $field['taxonomy'] . 'div', $post_type, 'side' );
250
+						if ( is_taxonomy_hierarchical( $field[ 'taxonomy' ] ) ) {
251
+							remove_meta_box( $field[ 'taxonomy' ] . 'div', $post_type, 'side' );
252 252
 						} else {
253
-							remove_meta_box( 'tagsdiv-' . $field['taxnomy'], $post_type, 'side' );
253
+							remove_meta_box( 'tagsdiv-' . $field[ 'taxnomy' ], $post_type, 'side' );
254 254
 						}
255 255
 					}
256 256
 				}
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 * @return array           Modified array of classes
268 268
 	 */
269 269
 	public function close_metabox_class( $classes ) {
270
-		$classes[] = 'closed';
270
+		$classes[ ] = 'closed';
271 271
 		return $classes;
272 272
 	}
273 273
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	public function user_new_metabox( $section ) {
288 288
 		if ( $section == $this->cmb->prop( 'new_user_section' ) ) {
289 289
 			$object_id = $this->cmb->object_id();
290
-			$this->cmb->object_id( isset( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : $object_id );
290
+			$this->cmb->object_id( isset( $_REQUEST[ 'user_id' ] ) ? $_REQUEST[ 'user_id' ] : $object_id );
291 291
 			$this->user_metabox();
292 292
 		}
293 293
 	}
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 		if ( $this->taxonomy_can_save( $taxonomy ) ) {
468 468
 
469 469
 			foreach ( $this->cmb->prop( 'fields' ) as $field ) {
470
-				$data_to_delete[ $field['id'] ] = '';
470
+				$data_to_delete[ $field[ 'id' ] ] = '';
471 471
 			}
472 472
 
473 473
 			$this->cmb->save_fields( $term_id, 'term', $data_to_delete );
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 			return;
531 531
 		}
532 532
 
533
-		self::$hooks_completed[] = $key;
533
+		self::$hooks_completed[ ] = $key;
534 534
 		add_filter( $action, $hook, $priority, $accepted_args );
535 535
 	}
536 536
 
Please login to merge, or discard this patch.