Completed
Push — trunk ( 6d8b6f...4aed86 )
by
unknown
733:17 queued 718:14
created
includes/CMB2_Field_Display.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
 		$options = $this->field->options();
206 206
 
207 207
 		$fallback = $this->field->args( 'show_option_none' );
208
-		if ( ! $fallback && isset( $options[''] ) ) {
209
-			$fallback = $options[''];
208
+		if ( ! $fallback && isset( $options[ '' ] ) ) {
209
+			$fallback = $options[ '' ];
210 210
 		}
211 211
 		if ( ! $this->value && $fallback ) {
212 212
 			echo $fallback;
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
 		$output = array();
235 235
 		foreach ( $this->value as $val ) {
236 236
 			if ( isset( $options[ $val ] ) ) {
237
-				$output[] = $options[ $val ];
237
+				$output[ ] = $options[ $val ];
238 238
 			} else {
239
-				$output[] = esc_attr( $val );
239
+				$output[ ] = esc_attr( $val );
240 240
 			}
241 241
 		}
242 242
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 		if ( $datetime && $datetime instanceof DateTime ) {
308 308
 			$tz       = $datetime->getTimezone();
309 309
 			$tzstring = $tz->getName();
310
-			$this->value    = $datetime->getTimestamp();
310
+			$this->value = $datetime->getTimestamp();
311 311
 		}
312 312
 
313 313
 		$date = $this->field->get_timestamp_format( 'date_format', $this->value );
@@ -359,10 +359,10 @@  discard block
 block discarded – undo
359 359
 			$terms = array();
360 360
 			if ( is_array( $default ) ) {
361 361
 				foreach ( $default as $slug ) {
362
-					$terms[] = get_term_by( 'slug', $slug, $taxonomy );
362
+					$terms[ ] = get_term_by( 'slug', $slug, $taxonomy );
363 363
 				}
364 364
 			} else {
365
-				$terms[] = get_term_by( 'slug', $default, $taxonomy );
365
+				$terms[ ] = get_term_by( 'slug', $default, $taxonomy );
366 366
 			}
367 367
 		}
368 368
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 			$links = array();
372 372
 			foreach ( $terms as $term ) {
373 373
 				$link = get_edit_term_link( $term->term_id, $taxonomy );
374
-				$links[] = '<a href="' . esc_url( $link ) . '">' . esc_html( $term->name ) . '</a>';
374
+				$links[ ] = '<a href="' . esc_url( $link ) . '">' . esc_html( $term->name ) . '</a>';
375 375
 			}
376 376
 			// Then loop and output.
377 377
 			echo '<div class="cmb2-taxonomy-terms-', esc_attr( $taxonomy ), '">';
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 					'class' => 'cmb-image-display',
419 419
 				) );
420 420
 			} else {
421
-				$size = is_array( $img_size ) ? $img_size[0] : 200;
421
+				$size = is_array( $img_size ) ? $img_size[ 0 ] : 200;
422 422
 				$image = '<img class="cmb-image-display" style="max-width: ' . absint( $size ) . 'px; width: 100%; height: auto;" src="' . $url_value . '" alt="" />';
423 423
 			}
424 424
 
Please login to merge, or discard this patch.