Completed
Pull Request — master (#1553)
by Aristeides
05:33 queued 02:27
created
core/class-kirki-init.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		$this->control_types = $this->default_control_types();
168 168
 		foreach ( $this->control_types as $key => $classname ) {
169 169
 			if ( ! class_exists( $classname ) ) {
170
-				unset( $this->control_types[ $key ] );
170
+				unset( $this->control_types[$key] );
171 171
 			}
172 172
 		}
173 173
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 			foreach ( Kirki::$panels as $panel_args ) {
196 196
 				// Extra checks for nested panels.
197 197
 				if ( isset( $panel_args['panel'] ) ) {
198
-					if ( isset( Kirki::$panels[ $panel_args['panel'] ] ) ) {
198
+					if ( isset( Kirki::$panels[$panel_args['panel']] ) ) {
199 199
 						// Set the type to nested.
200 200
 						$panel_args['type'] = 'kirki-nested';
201 201
 					}
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
 			foreach ( Kirki::$sections as $section_args ) {
218 218
 				// Extra checks for nested sections.
219 219
 				if ( isset( $section_args['section'] ) ) {
220
-					if ( isset( Kirki::$sections[ $section_args['section'] ] ) ) {
220
+					if ( isset( Kirki::$sections[$section_args['section']] ) ) {
221 221
 						// Set the type to nested.
222 222
 						$section_args['type'] = 'kirki-nested';
223 223
 						// We need to check if the parent section is nested inside a panel.
224
-						$parent_section = Kirki::$sections[ $section_args['section'] ];
224
+						$parent_section = Kirki::$sections[$section_args['section']];
225 225
 						if ( isset( $parent_section['panel'] ) ) {
226 226
 							$section_args['panel'] = $parent_section['panel'];
227 227
 						}
Please login to merge, or discard this patch.
controls/typography/class-kirki-control-typography.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -147,15 +147,15 @@  discard block
 block discarded – undo
147 147
 		}
148 148
 
149 149
 		foreach ( array_keys( $this->json['value'] ) as $key ) {
150
-			if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ) ) && ! isset( $this->json['default'][ $key ] ) ) {
151
-				unset( $this->json['value'][ $key ] );
150
+			if ( ! in_array( $key, array( 'variant', 'font-weight', 'font-style' ) ) && ! isset( $this->json['default'][$key] ) ) {
151
+				unset( $this->json['value'][$key] );
152 152
 			}
153 153
 		}
154 154
 
155 155
 		// Fix for https://github.com/aristath/kirki/issues/1405.
156 156
 		foreach ( array_keys( $this->json['value'] ) as $key ) {
157
-			if ( isset( $this->json['default'][ $key ] ) && false === $this->json['default'][ $key ] ) {
158
-				unset( $this->json['value'][ $key ] );
157
+			if ( isset( $this->json['default'][$key] ) && false === $this->json['default'][$key] ) {
158
+				unset( $this->json['value'][$key] );
159 159
 			}
160 160
 		}
161 161
 		$this->json['show_variants'] = ( true === Kirki_Fonts_Google::$force_load_all_variants ) ? false : true;
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 			if ( is_string( $variant ) ) {
339 339
 				$final_variants[] = array(
340 340
 					'id'    => $variant,
341
-					'label' => isset( $all_variants[ $variant ] ) ? $all_variants[ $variant ] : $variant,
341
+					'label' => isset( $all_variants[$variant] ) ? $all_variants[$variant] : $variant,
342 342
 				);
343 343
 			} elseif ( is_array( $variant ) && isset( $variant['id'] ) && isset( $variant['label'] ) ) {
344 344
 				$final_variants[] = $variant;
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 					if ( array_key_exists( $variant, $all_variants ) ) {
420 420
 						$available_variants[] = array(
421 421
 							'id' => $variant,
422
-							'label' => $all_variants[ $variant ],
422
+							'label' => $all_variants[$variant],
423 423
 						);
424 424
 					}
425 425
 				}
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 					if ( array_key_exists( $subset, $all_subsets ) ) {
432 432
 						$available_subsets[] = array(
433 433
 							'id' => $subset,
434
-							'label' => $all_subsets[ $subset ],
434
+							'label' => $all_subsets[$subset],
435 435
 						);
436 436
 					}
437 437
 				}
Please login to merge, or discard this patch.
modules/css/field/class-kirki-output-field-multicolor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 			$output['suffix'] = ( isset( $output['suffix'] ) ) ? $output['suffix'] : '';
48 48
 
49 49
 			// Create the styles.
50
-			$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $sub_value . $output['suffix'];
50
+			$this->styles[$output['media_query']][$output['element']][$property] = $sub_value . $output['suffix'];
51 51
 
52 52
 		}
53 53
 	}
Please login to merge, or discard this patch.