Passed
Push — develop ( f4564b...fd3ff6 )
by Aristeides
01:45
created
modules/css/field/class-kirki-output-field-background.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
 		foreach ( array( 'background-image', 'background-color', 'background-repeat', 'background-position', 'background-size', 'background-attachment' ) as $property ) {
37 37
 
38 38
 			// See https://github.com/aristath/kirki/issues/1808.
39
-			if ( 'background-color' === $property && isset( $value['background-color'] ) && $value['background-color'] && ( ! isset( $value['background-image'] ) || empty( $value['background-image'] ) ) ) {
40
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['background'] = $output['prefix'] . $this->process_property_value( $property, $value[ $property ] ) . $output['suffix'];
39
+			if ( 'background-color' === $property && isset( $value[ 'background-color' ] ) && $value[ 'background-color' ] && ( ! isset( $value[ 'background-image' ] ) || empty( $value[ 'background-image' ] ) ) ) {
40
+				$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ 'background' ] = $output[ 'prefix' ] . $this->process_property_value( $property, $value[ $property ] ) . $output[ 'suffix' ];
41 41
 			}
42 42
 
43 43
 			if ( isset( $value[ $property ] ) && ! empty( $value[ $property ] ) ) {
44
-				$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $this->process_property_value( $property, $value[ $property ] ) . $output['suffix'];
44
+				$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $property ] = $output[ 'prefix' ] . $this->process_property_value( $property, $value[ $property ] ) . $output[ 'suffix' ];
45 45
 			}
46 46
 		}
47 47
 	}
Please login to merge, or discard this patch.
modules/webfonts/class-kirki-fonts-google.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		$config = apply_filters( 'kirki_config', array() );
78 78
 
79 79
 		// If we have set $config['disable_google_fonts'] to true then do not proceed any further.
80
-		if ( isset( $config['disable_google_fonts'] ) && true === $config['disable_google_fonts'] ) {
80
+		if ( isset( $config[ 'disable_google_fonts' ] ) && true === $config[ 'disable_google_fonts' ] ) {
81 81
 			return;
82 82
 		}
83 83
 
@@ -115,57 +115,57 @@  discard block
 block discarded – undo
115 115
 		global $wp_customize;
116 116
 
117 117
 		// Process typography fields.
118
-		if ( isset( $args['type'] ) && 'kirki-typography' === $args['type'] ) {
118
+		if ( isset( $args[ 'type' ] ) && 'kirki-typography' === $args[ 'type' ] ) {
119 119
 
120 120
 			// Get the value.
121 121
 			$value = Kirki_Values::get_sanitized_field_value( $args );
122 122
 
123
-			if ( isset( $value['downloadFont'] ) && $value['downloadFont'] ) {
124
-				$this->hosted_fonts[] = $value['font-family'];
123
+			if ( isset( $value[ 'downloadFont' ] ) && $value[ 'downloadFont' ] ) {
124
+				$this->hosted_fonts[ ] = $value[ 'font-family' ];
125 125
 			}
126 126
 
127 127
 			// If we don't have a font-family then we can skip this.
128
-			if ( ! $wp_customize && ( ! isset( $value['font-family'] ) || in_array( $value['font-family'], $this->hosted_fonts, true ) ) ) {
128
+			if ( ! $wp_customize && ( ! isset( $value[ 'font-family' ] ) || in_array( $value[ 'font-family' ], $this->hosted_fonts, true ) ) ) {
129 129
 				return;
130 130
 			}
131 131
 
132 132
 			// If not a google-font, then we can skip this.
133
-			if ( ! isset( $value['font-family'] ) || ! Kirki_Fonts::is_google_font( $value['font-family'] ) ) {
133
+			if ( ! isset( $value[ 'font-family' ] ) || ! Kirki_Fonts::is_google_font( $value[ 'font-family' ] ) ) {
134 134
 				return;
135 135
 			}
136 136
 
137 137
 			// Set a default value for variants.
138
-			if ( ! isset( $value['variant'] ) ) {
139
-				$value['variant'] = 'regular';
138
+			if ( ! isset( $value[ 'variant' ] ) ) {
139
+				$value[ 'variant' ] = 'regular';
140 140
 			}
141 141
 
142 142
 			// Add the requested google-font.
143
-			if ( ! isset( $this->fonts[ $value['font-family'] ] ) ) {
144
-				$this->fonts[ $value['font-family'] ] = array();
143
+			if ( ! isset( $this->fonts[ $value[ 'font-family' ] ] ) ) {
144
+				$this->fonts[ $value[ 'font-family' ] ] = array();
145 145
 			}
146
-			if ( ! in_array( $value['variant'], $this->fonts[ $value['font-family'] ], true ) ) {
147
-				$this->fonts[ $value['font-family'] ][] = $value['variant'];
146
+			if ( ! in_array( $value[ 'variant' ], $this->fonts[ $value[ 'font-family' ] ], true ) ) {
147
+				$this->fonts[ $value[ 'font-family' ] ][ ] = $value[ 'variant' ];
148 148
 			}
149 149
 			// Are we force-loading all variants?
150 150
 			if ( true === self::$force_load_all_variants ) {
151 151
 				$all_variants               = Kirki_Fonts::get_all_variants();
152
-				$args['choices']['variant'] = array_keys( $all_variants );
152
+				$args[ 'choices' ][ 'variant' ] = array_keys( $all_variants );
153 153
 			}
154 154
 
155
-			if ( ! empty( $args['choices']['variant'] ) && is_array( $args['choices']['variant'] ) ) {
156
-				foreach ( $args['choices']['variant'] as $extra_variant ) {
157
-					$this->fonts[ $value['font-family'] ][] = $extra_variant;
155
+			if ( ! empty( $args[ 'choices' ][ 'variant' ] ) && is_array( $args[ 'choices' ][ 'variant' ] ) ) {
156
+				foreach ( $args[ 'choices' ][ 'variant' ] as $extra_variant ) {
157
+					$this->fonts[ $value[ 'font-family' ] ][ ] = $extra_variant;
158 158
 				}
159 159
 			}
160 160
 			return;
161 161
 		}
162 162
 
163 163
 		// Process non-typography fields.
164
-		if ( isset( $args['output'] ) && is_array( $args['output'] ) ) {
165
-			foreach ( $args['output'] as $output ) {
164
+		if ( isset( $args[ 'output' ] ) && is_array( $args[ 'output' ] ) ) {
165
+			foreach ( $args[ 'output' ] as $output ) {
166 166
 
167 167
 				// If we don't have a typography-related output argument we can skip this.
168
-				if ( ! isset( $output['property'] ) || ! in_array( $output['property'], array( 'font-family', 'font-weight' ), true ) ) {
168
+				if ( ! isset( $output[ 'property' ] ) || ! in_array( $output[ 'property' ], array( 'font-family', 'font-weight' ), true ) ) {
169 169
 					continue;
170 170
 				}
171 171
 
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
 				$value = Kirki_Values::get_sanitized_field_value( $args );
174 174
 
175 175
 				if ( is_string( $value ) ) {
176
-					if ( 'font-family' === $output['property'] ) {
176
+					if ( 'font-family' === $output[ 'property' ] ) {
177 177
 						if ( ! array_key_exists( $value, $this->fonts ) ) {
178 178
 							$this->fonts[ $value ] = array();
179 179
 						}
180
-					} elseif ( 'font-weight' === $output['property'] ) {
180
+					} elseif ( 'font-weight' === $output[ 'property' ] ) {
181 181
 						foreach ( $this->fonts as $font => $variants ) {
182 182
 							if ( ! in_array( $value, $variants, true ) ) {
183
-								$this->fonts[ $font ][] = $value;
183
+								$this->fonts[ $font ][ ] = $value;
184 184
 							}
185 185
 						}
186 186
 					}
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
 
213 213
 			// Get all valid font variants for this font.
214 214
 			$font_variants = array();
215
-			if ( isset( $this->google_fonts[ $font ]['variants'] ) ) {
216
-				$font_variants = $this->google_fonts[ $font ]['variants'];
215
+			if ( isset( $this->google_fonts[ $font ][ 'variants' ] ) ) {
216
+				$font_variants = $this->google_fonts[ $font ][ 'variants' ];
217 217
 			}
218 218
 			foreach ( $variants as $variant ) {
219 219
 
Please login to merge, or discard this patch.
modules/selective-refresh/class-kirki-modules-selective-refresh.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,14 +69,14 @@
 block discarded – undo
69 69
 
70 70
 		// Start parsing the fields.
71 71
 		foreach ( $fields as $field ) {
72
-			if ( isset( $field['partial_refresh'] ) && ! empty( $field['partial_refresh'] ) ) {
72
+			if ( isset( $field[ 'partial_refresh' ] ) && ! empty( $field[ 'partial_refresh' ] ) ) {
73 73
 				// Start going through each item in the array of partial refreshes.
74
-				foreach ( $field['partial_refresh'] as $partial_refresh => $partial_refresh_args ) {
74
+				foreach ( $field[ 'partial_refresh' ] as $partial_refresh => $partial_refresh_args ) {
75 75
 					// If we have all we need, create the selective refresh call.
76
-					if ( isset( $partial_refresh_args['render_callback'] ) && isset( $partial_refresh_args['selector'] ) ) {
76
+					if ( isset( $partial_refresh_args[ 'render_callback' ] ) && isset( $partial_refresh_args[ 'selector' ] ) ) {
77 77
 						$partial_refresh_args = wp_parse_args(
78 78
 							$partial_refresh_args, array(
79
-								'settings' => $field['settings'],
79
+								'settings' => $field[ 'settings' ],
80 80
 							)
81 81
 						);
82 82
 						$wp_customize->selective_refresh->add_partial( $partial_refresh, $partial_refresh_args );
Please login to merge, or discard this patch.
modules/customizer-branding/class-kirki-modules-customizer-branding.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@
 block discarded – undo
73 73
 			'logoImage'   => '',
74 74
 			'description' => '',
75 75
 		);
76
-		if ( isset( $config['logo_image'] ) && '' !== $config['logo_image'] ) {
77
-			$vars['logoImage'] = esc_url_raw( $config['logo_image'] );
76
+		if ( isset( $config[ 'logo_image' ] ) && '' !== $config[ 'logo_image' ] ) {
77
+			$vars[ 'logoImage' ] = esc_url_raw( $config[ 'logo_image' ] );
78 78
 		}
79
-		if ( isset( $config['description'] ) && '' !== $config['description'] ) {
80
-			$vars['description'] = esc_textarea( $config['description'] );
79
+		if ( isset( $config[ 'description' ] ) && '' !== $config[ 'description' ] ) {
80
+			$vars[ 'description' ] = esc_textarea( $config[ 'description' ] );
81 81
 		}
82 82
 
83
-		if ( ! empty( $vars['logoImage'] ) || ! empty( $vars['description'] ) ) {
83
+		if ( ! empty( $vars[ 'logoImage' ] ) || ! empty( $vars[ 'description' ] ) ) {
84 84
 			wp_register_script( 'kirki-branding', Kirki::$url . '/modules/customizer-branding/branding.js', array(), KIRKI_VERSION, false );
85 85
 			wp_localize_script( 'kirki-branding', 'kirkiBranding', $vars );
86 86
 			wp_enqueue_script( 'kirki-branding' );
Please login to merge, or discard this patch.
modules/custom-sections/panels/class-kirki-panels-nested-panel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@
 block discarded – undo
51 51
 			)
52 52
 		);
53 53
 
54
-		$array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
55
-		$array['content']        = $this->get_content();
56
-		$array['active']         = $this->active();
57
-		$array['instanceNumber'] = $this->instance_number;
54
+		$array[ 'title' ]          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
55
+		$array[ 'content' ]        = $this->get_content();
56
+		$array[ 'active' ]         = $this->active();
57
+		$array[ 'instanceNumber' ] = $this->instance_number;
58 58
 
59 59
 		return $array;
60 60
 	}
Please login to merge, or discard this patch.
core/class-kirki-helper.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 		// Handle the arguments, merge one by one.
38 38
 		$args  = func_get_args();
39
-		$array = $args[0];
39
+		$array = $args[ 0 ];
40 40
 		if ( ! is_array( $array ) ) {
41 41
 			return $array;
42 42
 		}
@@ -92,27 +92,27 @@  discard block
 block discarded – undo
92 92
 
93 93
 		if ( 'ftpext' === $method ) {
94 94
 			// If defined, set it to that, Else, set to NULL.
95
-			$credentials['hostname'] = defined( 'FTP_HOST' ) ? preg_replace( '|\w+://|', '', FTP_HOST ) : null;
96
-			$credentials['username'] = defined( 'FTP_USER' ) ? FTP_USER : null;
97
-			$credentials['password'] = defined( 'FTP_PASS' ) ? FTP_PASS : null;
95
+			$credentials[ 'hostname' ] = defined( 'FTP_HOST' ) ? preg_replace( '|\w+://|', '', FTP_HOST ) : null;
96
+			$credentials[ 'username' ] = defined( 'FTP_USER' ) ? FTP_USER : null;
97
+			$credentials[ 'password' ] = defined( 'FTP_PASS' ) ? FTP_PASS : null;
98 98
 
99 99
 			// Set FTP port.
100
-			if ( strpos( $credentials['hostname'], ':' ) && null !== $credentials['hostname'] ) {
101
-				list( $credentials['hostname'], $credentials['port'] ) = explode( ':', $credentials['hostname'], 2 );
102
-				if ( ! is_numeric( $credentials['port'] ) ) {
103
-					unset( $credentials['port'] );
100
+			if ( strpos( $credentials[ 'hostname' ], ':' ) && null !== $credentials[ 'hostname' ] ) {
101
+				list( $credentials[ 'hostname' ], $credentials[ 'port' ] ) = explode( ':', $credentials[ 'hostname' ], 2 );
102
+				if ( ! is_numeric( $credentials[ 'port' ] ) ) {
103
+					unset( $credentials[ 'port' ] );
104 104
 				}
105 105
 			} else {
106
-				unset( $credentials['port'] );
106
+				unset( $credentials[ 'port' ] );
107 107
 			}
108 108
 
109 109
 			// Set connection type.
110 110
 			if ( ( defined( 'FTP_SSL' ) && FTP_SSL ) && 'ftpext' === $method ) {
111
-				$credentials['connection_type'] = 'ftps';
111
+				$credentials[ 'connection_type' ] = 'ftps';
112 112
 			} elseif ( ! array_filter( $credentials ) ) {
113
-				$credentials['connection_type'] = null;
113
+				$credentials[ 'connection_type' ] = null;
114 114
 			} else {
115
-				$credentials['connection_type'] = 'ftp';
115
+				$credentials[ 'connection_type' ] = 'ftp';
116 116
 			}
117 117
 		}
118 118
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 		}
150 150
 
151 151
 		if ( ! empty( $attachment ) ) {
152
-			return $attachment[0];
152
+			return $attachment[ 0 ];
153 153
 		}
154 154
 		return 0;
155 155
 	}
@@ -166,10 +166,10 @@  discard block
 block discarded – undo
166 166
 		$image    = wp_get_attachment_image_src( $image_id, 'full' );
167 167
 
168 168
 		return array(
169
-			'url'       => $image[0],
170
-			'width'     => $image[1],
171
-			'height'    => $image[2],
172
-			'thumbnail' => $image[3],
169
+			'url'       => $image[ 0 ],
170
+			'width'     => $image[ 1 ],
171
+			'height'    => $image[ 2 ],
172
+			'thumbnail' => $image[ 3 ],
173 173
 		);
174 174
 
175 175
 	}
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
 					'suppress_filters' => false,
191 191
 				)
192 192
 			);
193
-		} elseif ( is_array( $args ) && ! isset( $args['suppress_filters'] ) ) {
194
-			$args['suppress_filters'] = false;
193
+		} elseif ( is_array( $args ) && ! isset( $args[ 'suppress_filters' ] ) ) {
194
+			$args[ 'suppress_filters' ] = false;
195 195
 		}
196 196
 
197 197
 		// Get the posts.
@@ -341,41 +341,41 @@  discard block
 block discarded – undo
341 341
 				$key = absint( $context ) / 100;
342 342
 				if ( 'A100' === $context ) {
343 343
 					$key = 10;
344
-					unset( $colors['grey'] );
344
+					unset( $colors[ 'grey' ] );
345 345
 				} elseif ( 'A200' === $context ) {
346 346
 					$key = 11;
347
-					unset( $colors['grey'] );
347
+					unset( $colors[ 'grey' ] );
348 348
 				} elseif ( 'A400' === $context ) {
349 349
 					$key = 12;
350
-					unset( $colors['grey'] );
350
+					unset( $colors[ 'grey' ] );
351 351
 				} elseif ( 'A700' === $context ) {
352 352
 					$key = 13;
353
-					unset( $colors['grey'] );
353
+					unset( $colors[ 'grey' ] );
354 354
 				}
355
-				unset( $colors['primary'] );
355
+				unset( $colors[ 'primary' ] );
356 356
 				$position_colors = array();
357 357
 				foreach ( $colors as $color_family ) {
358 358
 					if ( isset( $color_family[ $key ] ) ) {
359
-						$position_colors[] = $color_family[ $key ];
359
+						$position_colors[ ] = $color_family[ $key ];
360 360
 					}
361 361
 				}
362 362
 				return $position_colors;
363 363
 			case 'all':
364
-				unset( $colors['primary'] );
364
+				unset( $colors[ 'primary' ] );
365 365
 				$all_colors = array();
366 366
 				foreach ( $colors as $color_family ) {
367 367
 					foreach ( $color_family as $color ) {
368
-						$all_colors[] = $color;
368
+						$all_colors[ ] = $color;
369 369
 					}
370 370
 				}
371 371
 				return $all_colors;
372 372
 			case 'primary':
373
-				return $colors['primary'];
373
+				return $colors[ 'primary' ];
374 374
 			default:
375 375
 				if ( isset( $colors[ $context ] ) ) {
376 376
 					return $colors[ $context ];
377 377
 				}
378
-				return $colors['primary'];
378
+				return $colors[ 'primary' ];
379 379
 		}
380 380
 	}
381 381
 
Please login to merge, or discard this patch.
modules/css/property/class-kirki-output-property-background-image.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
 	 * @access protected
21 21
 	 */
22 22
 	protected function process_value() {
23
-		if ( is_array( $this->value ) && isset( $this->value['url'] ) ) {
24
-			$this->value = $this->value['url'];
23
+		if ( is_array( $this->value ) && isset( $this->value[ 'url' ] ) ) {
24
+			$this->value = $this->value[ 'url' ];
25 25
 		}
26 26
 		if ( false === strpos( $this->value, 'gradient' ) && false === strpos( $this->value, 'url(' ) ) {
27 27
 			if ( empty( $this->value ) ) {
Please login to merge, or discard this patch.
modules/css/field/class-kirki-output-field-typography.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 	 * @param array $value  The field's value.
23 23
 	 */
24 24
 	protected function process_output( $output, $value ) {
25
-		$output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global';
26
-		$output['element']     = ( isset( $output['element'] ) ) ? $output['element'] : 'body';
27
-		$output['prefix']      = ( isset( $output['prefix'] ) ) ? $output['prefix'] : '';
28
-		$output['suffix']      = ( isset( $output['suffix'] ) ) ? $output['suffix'] : '';
25
+		$output[ 'media_query' ] = ( isset( $output[ 'media_query' ] ) ) ? $output[ 'media_query' ] : 'global';
26
+		$output[ 'element' ]     = ( isset( $output[ 'element' ] ) ) ? $output[ 'element' ] : 'body';
27
+		$output[ 'prefix' ]      = ( isset( $output[ 'prefix' ] ) ) ? $output[ 'prefix' ] : '';
28
+		$output[ 'suffix' ]      = ( isset( $output[ 'suffix' ] ) ) ? $output[ 'suffix' ] : '';
29 29
 
30 30
 		$value = Kirki_Field_Typography::sanitize( $value );
31 31
 
@@ -47,7 +47,7 @@  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
 
@@ -57,39 +57,39 @@  discard block
 block discarded – undo
57 57
 			}
58 58
 
59 59
 			// Early exit if we use "choice" but not for this property.
60
-			if ( isset( $output['choice'] ) && $output['choice'] !== $property ) {
60
+			if ( isset( $output[ 'choice' ] ) && $output[ 'choice' ] !== $property ) {
61 61
 				continue;
62 62
 			}
63 63
 
64 64
 			// Take care of variants.
65
-			if ( 'variant' === $property && isset( $value['variant'] ) && ! empty( $value['variant'] ) ) {
65
+			if ( 'variant' === $property && isset( $value[ 'variant' ] ) && ! empty( $value[ 'variant' ] ) ) {
66 66
 
67 67
 				// Get the font_weight.
68
-				$font_weight = str_replace( 'italic', '', $value['variant'] );
68
+				$font_weight = str_replace( 'italic', '', $value[ 'variant' ] );
69 69
 				$font_weight = ( in_array( $font_weight, array( '', 'regular' ), true ) ) ? '400' : $font_weight;
70 70
 
71 71
 				// Is this italic?
72
-				$is_italic = ( false !== strpos( $value['variant'], 'italic' ) );
73
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['font-weight'] = $font_weight;
72
+				$is_italic = ( false !== strpos( $value[ 'variant' ], 'italic' ) );
73
+				$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ 'font-weight' ] = $font_weight;
74 74
 				if ( $is_italic ) {
75
-					$this->styles[ $output['media_query'] ][ $output['element'] ]['font-style'] = 'italic';
75
+					$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ 'font-style' ] = 'italic';
76 76
 				}
77 77
 				continue;
78 78
 			}
79 79
 
80 80
 			$property_value = $this->process_property_value( $property, $value[ $property ] );
81 81
 			if ( 'font-family' === $property ) {
82
-				$value['font-backup'] = ( isset( $value['font-backup'] ) ) ? $value['font-backup'] : '';
82
+				$value[ 'font-backup' ] = ( isset( $value[ 'font-backup' ] ) ) ? $value[ 'font-backup' ] : '';
83 83
 				$property_value       = $this->process_property_value(
84 84
 					$property, array(
85
-						$value['font-family'],
86
-						$value['font-backup'],
85
+						$value[ 'font-family' ],
86
+						$value[ 'font-backup' ],
87 87
 					)
88 88
 				);
89 89
 			}
90
-			$property       = ( isset( $output['choice'] ) && isset( $output['property'] ) ) ? $output['property'] : $property;
91
-			$property_value = ( is_array( $property_value ) && isset( $property_value[0] ) ) ? $property_value[0] : $property_value;
92
-			$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $property_value . $output['suffix'];
90
+			$property       = ( isset( $output[ 'choice' ] ) && isset( $output[ 'property' ] ) ) ? $output[ 'property' ] : $property;
91
+			$property_value = ( is_array( $property_value ) && isset( $property_value[ 0 ] ) ) ? $property_value[ 0 ] : $property_value;
92
+			$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $property ] = $output[ 'prefix' ] . $property_value . $output[ 'suffix' ];
93 93
 		}
94 94
 	}
95 95
 }
Please login to merge, or discard this patch.
modules/css/field/class-kirki-output-field-image.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 * @param array $value  The field's value.
23 23
 	 */
24 24
 	protected function process_output( $output, $value ) {
25
-		if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) {
25
+		if ( ! isset( $output[ 'element' ] ) || ! isset( $output[ 'property' ] ) ) {
26 26
 			return;
27 27
 		}
28 28
 		$output = wp_parse_args(
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
 			)
35 35
 		);
36 36
 		if ( is_array( $value ) ) {
37
-			if ( isset( $output['choice'] ) && $output['choice'] ) {
38
-				$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value[ $output['choice'] ] ) . $output['units'] . $output['suffix'];
37
+			if ( isset( $output[ 'choice' ] ) && $output[ 'choice' ] ) {
38
+				$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $output[ 'property' ] ] = $output[ 'prefix' ] . $this->process_property_value( $output[ 'property' ], $value[ $output[ 'choice' ] ] ) . $output[ 'units' ] . $output[ 'suffix' ];
39 39
 				return;
40 40
 			}
41
-			if ( isset( $value['url'] ) ) {
42
-				$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value['url'] ) . $output['units'] . $output['suffix'];
41
+			if ( isset( $value[ 'url' ] ) ) {
42
+				$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $output[ 'property' ] ] = $output[ 'prefix' ] . $this->process_property_value( $output[ 'property' ], $value[ 'url' ] ) . $output[ 'units' ] . $output[ 'suffix' ];
43 43
 				return;
44 44
 			}
45 45
 			return;
46 46
 		}
47
-		$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value ) . $output['units'] . $output['suffix'];
47
+		$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $output[ 'property' ] ] = $output[ 'prefix' ] . $this->process_property_value( $output[ 'property' ], $value ) . $output[ 'units' ] . $output[ 'suffix' ];
48 48
 	}
49 49
 }
Please login to merge, or discard this patch.