Test Setup Failed
Push — master ( 55e7e9...3e6d69 )
by Aristeides
02:11
created
modules/css/field/class-kirki-output-field-typography.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	protected function process_output( $output, $value ) {
25 25
 
26
-		$output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global';
27
-		$output['element']     = ( isset( $output['element'] ) ) ? $output['element'] : 'body';
28
-		$output['prefix']      = ( isset( $output['prefix'] ) ) ? $output['prefix'] : '';
29
-		$output['suffix']      = ( isset( $output['suffix'] ) ) ? $output['suffix'] : '';
26
+		$output[ 'media_query' ] = ( isset( $output[ 'media_query' ] ) ) ? $output[ 'media_query' ] : 'global';
27
+		$output[ 'element' ]     = ( isset( $output[ 'element' ] ) ) ? $output[ 'element' ] : 'body';
28
+		$output[ 'prefix' ]      = ( isset( $output[ 'prefix' ] ) ) ? $output[ 'prefix' ] : '';
29
+		$output[ 'suffix' ]      = ( isset( $output[ 'suffix' ] ) ) ? $output[ 'suffix' ] : '';
30 30
 
31 31
 		$value = Kirki_Field_Typography::sanitize( $value );
32 32
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		foreach ( $properties as $property ) {
49 49
 
50 50
 			// Early exit if the value is not in the defaults.
51
-			if ( ! isset( $this->field['default'][ $property ] ) ) {
51
+			if ( ! isset( $this->field[ 'default' ][ $property ] ) ) {
52 52
 				continue;
53 53
 			}
54 54
 
@@ -58,37 +58,37 @@  discard block
 block discarded – undo
58 58
 			}
59 59
 
60 60
 			// Early exit if we use "choice" but not for this property.
61
-			if ( isset( $output['choice'] ) && $output['choice'] !== $property ) {
61
+			if ( isset( $output[ 'choice' ] ) && $output[ 'choice' ] !== $property ) {
62 62
 				continue;
63 63
 			}
64 64
 
65 65
 			// Take care of variants.
66
-			if ( 'variant' == $property && isset( $value['variant'] ) && ! empty( $value['variant'] ) ) {
66
+			if ( 'variant' == $property && isset( $value[ 'variant' ] ) && ! empty( $value[ 'variant' ] ) ) {
67 67
 
68 68
 				// Get the font_weight.
69
-				$font_weight = str_replace( 'italic', '', $value['variant'] );
69
+				$font_weight = str_replace( 'italic', '', $value[ 'variant' ] );
70 70
 				$font_weight = ( in_array( $font_weight, array( '', 'regular' ) ) ) ? '400' : $font_weight;
71 71
 
72 72
 				// Is this italic?
73
-				$is_italic = ( false !== strpos( $value['variant'], 'italic' ) );
74
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['font-weight'] = $font_weight;
73
+				$is_italic = ( false !== strpos( $value[ 'variant' ], 'italic' ) );
74
+				$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ 'font-weight' ] = $font_weight;
75 75
 				if ( $is_italic ) {
76
-					$this->styles[ $output['media_query'] ][ $output['element'] ]['font-style'] = 'italic';
76
+					$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ 'font-style' ] = 'italic';
77 77
 				}
78 78
 				continue;
79 79
 			}
80 80
 
81 81
 			$property_value = $this->process_property_value( $property, $value[ $property ] );
82 82
 			if ( 'font-family' === $property ) {
83
-				$value['font-backup'] = ( isset( $value['font-backup'] ) ) ? $value['font-backup'] : '';
83
+				$value[ 'font-backup' ] = ( isset( $value[ 'font-backup' ] ) ) ? $value[ 'font-backup' ] : '';
84 84
 				$property_value = $this->process_property_value( $property, array(
85
-					$value['font-family'],
86
-					$value['font-backup'],
85
+					$value[ 'font-family' ],
86
+					$value[ 'font-backup' ],
87 87
 				) );
88 88
 			}
89
-			$property = ( isset( $output['choice'] ) && isset( $output['property'] ) ) ? $output['property'] : $property;
90
-			$property_value = ( is_array( $property_value ) && isset( $property_value[0] ) ) ? $property_value[0] : $property_value;
91
-			$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $property_value . $output['suffix'];
89
+			$property = ( isset( $output[ 'choice' ] ) && isset( $output[ 'property' ] ) ) ? $output[ 'property' ] : $property;
90
+			$property_value = ( is_array( $property_value ) && isset( $property_value[ 0 ] ) ) ? $property_value[ 0 ] : $property_value;
91
+			$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $property ] = $output[ 'prefix' ] . $property_value . $output[ 'suffix' ];
92 92
 		}
93 93
 	}
94 94
 }
Please login to merge, or discard this patch.
controls/php/class-kirki-control-select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 	public function to_json() {
54 54
 		parent::to_json();
55 55
 
56
-		$this->json['multiple'] = $this->multiple;
57
-		$this->json['placeholder'] = $this->placeholder;
56
+		$this->json[ 'multiple' ] = $this->multiple;
57
+		$this->json[ 'placeholder' ] = $this->placeholder;
58 58
 	}
59 59
 }
Please login to merge, or discard this patch.