Completed
Pull Request — develop (#1826)
by Aristeides
02:31
created
core/class-kirki-helper.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 		// Handle the arguments, merge one by one.
39 39
 		$args  = func_get_args();
40
-		$array = $args[0];
40
+		$array = $args[ 0 ];
41 41
 		if ( ! is_array( $array ) ) {
42 42
 			return $array;
43 43
 		}
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		}
115 115
 
116 116
 		if ( ! empty( $attachment ) ) {
117
-			return $attachment[0];
117
+			return $attachment[ 0 ];
118 118
 		}
119 119
 		return 0;
120 120
 	}
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
 		$image    = wp_get_attachment_image_src( $image_id, 'full' );
132 132
 
133 133
 		return array(
134
-			'url'       => $image[0],
135
-			'width'     => $image[1],
136
-			'height'    => $image[2],
137
-			'thumbnail' => $image[3],
134
+			'url'       => $image[ 0 ],
135
+			'width'     => $image[ 1 ],
136
+			'height'    => $image[ 2 ],
137
+			'thumbnail' => $image[ 3 ],
138 138
 		);
139 139
 
140 140
 	}
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
 					'suppress_filters' => false,
156 156
 				)
157 157
 			);
158
-		} elseif ( is_array( $args ) && ! isset( $args['suppress_filters'] ) ) {
159
-			$args['suppress_filters'] = false;
158
+		} elseif ( is_array( $args ) && ! isset( $args[ 'suppress_filters' ] ) ) {
159
+			$args[ 'suppress_filters' ] = false;
160 160
 		}
161 161
 
162 162
 		// Get the posts.
@@ -306,41 +306,41 @@  discard block
 block discarded – undo
306 306
 				$key = absint( $context ) / 100;
307 307
 				if ( 'A100' === $context ) {
308 308
 					$key = 10;
309
-					unset( $colors['grey'] );
309
+					unset( $colors[ 'grey' ] );
310 310
 				} elseif ( 'A200' === $context ) {
311 311
 					$key = 11;
312
-					unset( $colors['grey'] );
312
+					unset( $colors[ 'grey' ] );
313 313
 				} elseif ( 'A400' === $context ) {
314 314
 					$key = 12;
315
-					unset( $colors['grey'] );
315
+					unset( $colors[ 'grey' ] );
316 316
 				} elseif ( 'A700' === $context ) {
317 317
 					$key = 13;
318
-					unset( $colors['grey'] );
318
+					unset( $colors[ 'grey' ] );
319 319
 				}
320
-				unset( $colors['primary'] );
320
+				unset( $colors[ 'primary' ] );
321 321
 				$position_colors = array();
322 322
 				foreach ( $colors as $color_family ) {
323 323
 					if ( isset( $color_family[ $key ] ) ) {
324
-						$position_colors[] = $color_family[ $key ];
324
+						$position_colors[ ] = $color_family[ $key ];
325 325
 					}
326 326
 				}
327 327
 				return $position_colors;
328 328
 			case 'all':
329
-				unset( $colors['primary'] );
329
+				unset( $colors[ 'primary' ] );
330 330
 				$all_colors = array();
331 331
 				foreach ( $colors as $color_family ) {
332 332
 					foreach ( $color_family as $color ) {
333
-						$all_colors[] = $color;
333
+						$all_colors[ ] = $color;
334 334
 					}
335 335
 				}
336 336
 				return $all_colors;
337 337
 			case 'primary':
338
-				return $colors['primary'];
338
+				return $colors[ 'primary' ];
339 339
 			default:
340 340
 				if ( isset( $colors[ $context ] ) ) {
341 341
 					return $colors[ $context ];
342 342
 				}
343
-				return $colors['primary'];
343
+				return $colors[ 'primary' ];
344 344
 		} // End switch().
345 345
 	}
346 346
 
@@ -404,8 +404,8 @@  discard block
 block discarded – undo
404 404
 			return $value2 < $value1;
405 405
 		}
406 406
 		if ( 'contains' === $operator || 'in' === $operator ) {
407
-            if ( is_array( $value1 ) && is_array( $value2 ) ){
408
-                foreach ( $value2 as $val ){
407
+            if ( is_array( $value1 ) && is_array( $value2 ) ) {
408
+                foreach ( $value2 as $val ) {
409 409
                     if ( in_array( $val, $value1 ) ) {
410 410
                         return true;
411 411
                     }
Please login to merge, or discard this patch.