Completed
Push — develop ( 63e0b7...783d0d )
by Aristeides
02:06
created
modules/css/field/class-kirki-output-field-typography.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
 		foreach ( $properties as $property ) {
48 48
 
49 49
 			// Early exit if the value is not in the defaults.
50
-			if ( ! isset( $this->field['default'][ $property ] ) ) {
50
+			if ( ! isset( $this->field['default'][$property] ) ) {
51 51
 				continue;
52 52
 			}
53 53
 
54 54
 			// Early exit if the value is not saved in the values.
55
-			if ( ! isset( $value[ $property ] ) || ! $value[ $property ] ) {
55
+			if ( ! isset( $value[$property] ) || ! $value[$property] ) {
56 56
 				continue;
57 57
 			}
58 58
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 				continue;
62 62
 			}
63 63
 
64
-			$property_value = $this->process_property_value( $property, $value[ $property ] );
64
+			$property_value = $this->process_property_value( $property, $value[$property] );
65 65
 			if ( 'font-family' === $property ) {
66 66
 				$value['font-backup'] = ( isset( $value['font-backup'] ) ) ? $value['font-backup'] : '';
67 67
 				$property_value = $this->process_property_value( $property, array(
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			}
72 72
 			$property = ( isset( $output['choice'] ) && isset( $output['property'] ) ) ? $output['property'] : $property;
73 73
 			$property_value = ( is_array( $property_value ) && isset( $property_value[0] ) ) ? $property_value[0] : $property_value;
74
-			$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $property_value . $output['suffix'];
74
+			$this->styles[$output['media_query']][$output['element']][$property] = $output['prefix'] . $property_value . $output['suffix'];
75 75
 		}
76 76
 	}
77 77
 }
Please login to merge, or discard this patch.
modules/css/class-kirki-modules-css-generator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			'kirki-multicolor'  => 'Kirki_Output_Field_Multicolor',
173 173
 		) );
174 174
 		if ( array_key_exists( self::$field_type, $field_output_classes ) ) {
175
-			$classname = $field_output_classes[ self::$field_type ];
175
+			$classname = $field_output_classes[self::$field_type];
176 176
 		}
177 177
 		$obj = new $classname( $field['kirki_config'], self::$output, self::$value, $field );
178 178
 		return $obj->get_styles();
@@ -247,10 +247,10 @@  discard block
 block discarded – undo
247 247
 							'transition',
248 248
 							'transition-property',
249 249
 						), true ) ) {
250
-							unset( $css[ $media_query ][ $element ][ $property ] );
251
-							$css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value;
252
-							$css[ $media_query ][ $element ][ '-moz-' . $property ]    = $value;
253
-							$css[ $media_query ][ $element ][ $property ]              = $value;
250
+							unset( $css[$media_query][$element][$property] );
251
+							$css[$media_query][$element]['-webkit-' . $property] = $value;
252
+							$css[$media_query][$element]['-moz-' . $property]    = $value;
253
+							$css[$media_query][$element][$property]              = $value;
254 254
 						}
255 255
 
256 256
 						// Add -ms-* and -o-*.
@@ -260,10 +260,10 @@  discard block
 block discarded – undo
260 260
 							'transition',
261 261
 							'transition-property',
262 262
 						), true ) ) {
263
-							unset( $css[ $media_query ][ $element ][ $property ] );
264
-							$css[ $media_query ][ $element ][ '-ms-' . $property ] = $value;
265
-							$css[ $media_query ][ $element ][ '-o-' . $property ]  = $value;
266
-							$css[ $media_query ][ $element ][ $property ]          = $value;
263
+							unset( $css[$media_query][$element][$property] );
264
+							$css[$media_query][$element]['-ms-' . $property] = $value;
265
+							$css[$media_query][$element]['-o-' . $property]  = $value;
266
+							$css[$media_query][$element][$property]          = $value;
267 267
 						}
268 268
 					}
269 269
 				}
Please login to merge, or discard this patch.
controls/php/class-kirki-control-typography.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,16 +56,16 @@  discard block
 block discarded – undo
56 56
 
57 57
 		if ( is_array( $this->json['value'] ) ) {
58 58
 			foreach ( array_keys( $this->json['value'] ) as $key ) {
59
-				if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][ $key ] ) ) {
60
-					unset( $this->json['value'][ $key ] );
59
+				if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ), true ) && ! isset( $this->json['default'][$key] ) ) {
60
+					unset( $this->json['value'][$key] );
61 61
 				}
62 62
 				// Fix for https://wordpress.org/support/topic/white-font-after-updateing-to-3-0-16
63
-				if ( ! isset( $this->json['default'][ $key ] ) ) {
64
-					unset( $this->json['value'][ $key ] );
63
+				if ( ! isset( $this->json['default'][$key] ) ) {
64
+					unset( $this->json['value'][$key] );
65 65
 				}
66 66
 				// Fix for https://github.com/aristath/kirki/issues/1405.
67
-				if ( isset( $this->json['default'][ $key ] ) && false === $this->json['default'][ $key ] ) {
68
-					unset( $this->json['value'][ $key ] );
67
+				if ( isset( $this->json['default'][$key] ) && false === $this->json['default'][$key] ) {
68
+					unset( $this->json['value'][$key] );
69 69
 				}
70 70
 			}
71 71
 		}
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 			if ( is_string( $variant ) ) {
282 282
 				$final_variants[] = array(
283 283
 					'id'    => $variant,
284
-					'label' => isset( $all_variants[ $variant ] ) ? $all_variants[ $variant ] : $variant,
284
+					'label' => isset( $all_variants[$variant] ) ? $all_variants[$variant] : $variant,
285 285
 				);
286 286
 			} elseif ( is_array( $variant ) && isset( $variant['id'] ) && isset( $variant['label'] ) ) {
287 287
 				$final_variants[] = $variant;
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 					if ( array_key_exists( $variant, $all_variants ) ) {
365 365
 						$available_variants[] = array(
366 366
 							'id' => $variant,
367
-							'label' => $all_variants[ $variant ],
367
+							'label' => $all_variants[$variant],
368 368
 						);
369 369
 					}
370 370
 				}
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 					if ( array_key_exists( $subset, $all_subsets ) ) {
377 377
 						$available_subsets[] = array(
378 378
 							'id' => $subset,
379
-							'label' => $all_subsets[ $subset ],
379
+							'label' => $all_subsets[$subset],
380 380
 						);
381 381
 					}
382 382
 				}
Please login to merge, or discard this patch.