Completed
Push — develop ( b742c3...067e83 )
by Aristeides
02:30
created
modules/css/class-kirki-modules-css-generator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 			'kirki-multicolor' => 'Kirki_Output_Field_Multicolor',
172 172
 		) );
173 173
 		if ( array_key_exists( self::$field_type, $field_output_classes ) ) {
174
-			$classname = $field_output_classes[ self::$field_type ];
174
+			$classname = $field_output_classes[self::$field_type];
175 175
 		}
176 176
 		$obj = new $classname( $field['kirki_config'], self::$output, self::$value );
177 177
 		return $obj->get_styles();
@@ -235,10 +235,10 @@  discard block
 block discarded – undo
235 235
 							'transition',
236 236
 							'transition-property',
237 237
 						) ) ) {
238
-							unset( $css[ $media_query ][ $element ][ $property ] );
239
-							$css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value;
240
-							$css[ $media_query ][ $element ][ '-moz-' . $property ]    = $value;
241
-							$css[ $media_query ][ $element ][ $property ]              = $value;
238
+							unset( $css[$media_query][$element][$property] );
239
+							$css[$media_query][$element]['-webkit-' . $property] = $value;
240
+							$css[$media_query][$element]['-moz-' . $property]    = $value;
241
+							$css[$media_query][$element][$property]              = $value;
242 242
 						}
243 243
 
244 244
 						// Add -ms-* and -o-*.
@@ -248,10 +248,10 @@  discard block
 block discarded – undo
248 248
 							'transition',
249 249
 							'transition-property',
250 250
 						) ) ) {
251
-							unset( $css[ $media_query ][ $element ][ $property ] );
252
-							$css[ $media_query ][ $element ][ '-ms-' . $property ] = $value;
253
-							$css[ $media_query ][ $element ][ '-o-' . $property ]  = $value;
254
-							$css[ $media_query ][ $element ][ $property ]          = $value;
251
+							unset( $css[$media_query][$element][$property] );
252
+							$css[$media_query][$element]['-ms-' . $property] = $value;
253
+							$css[$media_query][$element]['-o-' . $property]  = $value;
254
+							$css[$media_query][$element][$property]          = $value;
255 255
 						}
256 256
 					}
257 257
 				}
Please login to merge, or discard this patch.
controls/typography/class-kirki-control-typography.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 				if ( array_key_exists( $variant, $all_variants ) ) {
157 157
 					$available_variants[] = array(
158 158
 						'id' => $variant,
159
-						'label' => $all_variants[ $variant ],
159
+						'label' => $all_variants[$variant],
160 160
 					);
161 161
 				}
162 162
 			}
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 				if ( array_key_exists( $subset, $all_subsets ) ) {
167 167
 					$available_subsets[] = array(
168 168
 						'id' => $subset,
169
-						'label' => $all_subsets[ $subset ],
169
+						'label' => $all_subsets[$subset],
170 170
 					);
171 171
 				}
172 172
 			}
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 		if ( false === $config_id ) {
474 474
 			return $translation_strings;
475 475
 		}
476
-		return $translation_strings[ $config_id ];
476
+		return $translation_strings[$config_id];
477 477
 	}
478 478
 
479 479
 	/**
Please login to merge, or discard this patch.
controls/repeater/class-kirki-control-repeater.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 
112 112
 		foreach ( $args['fields'] as $key => $value ) {
113 113
 			if ( ! isset( $value['default'] ) ) {
114
-				$args['fields'][ $key ]['default'] = '';
114
+				$args['fields'][$key]['default'] = '';
115 115
 			}
116 116
 			if ( ! isset( $value['label'] ) ) {
117
-				$args['fields'][ $key ]['label'] = '';
117
+				$args['fields'][$key]['label'] = '';
118 118
 			}
119
-			$args['fields'][ $key ]['id']      = $key;
119
+			$args['fields'][$key]['id'] = $key;
120 120
 
121 121
 			// We check if the filed is an uploaded media ( image , file, video, etc.. ).
122 122
 			if ( isset( $value['type'] ) ) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 					case 'cropped_image':
126 126
 					case 'upload':
127 127
 						// We add it to the list of fields that need some extra filtering/processing.
128
-						$media_fields_to_filter[ $key ] = true;
128
+						$media_fields_to_filter[$key] = true;
129 129
 						break;
130 130
 
131 131
 					case 'dropdown-pages':
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 							)
141 141
 						);
142 142
 						// Hackily add in the data link parameter.
143
-						$dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][ $key ]['id'] ) . '"' . $this->get_link(), $dropdown );
144
-						$args['fields'][ $key ]['dropdown'] = $dropdown;
143
+						$dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][$key]['id'] ) . '"' . $this->get_link(), $dropdown );
144
+						$args['fields'][$key]['dropdown'] = $dropdown;
145 145
 						break;
146 146
 				}
147 147
 			}
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 			}
584 584
 
585 585
 			// Validating row label field.
586
-			if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][ esc_attr( $args['row_label']['field'] ) ] ) ) {
586
+			if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][esc_attr( $args['row_label']['field'] )] ) ) {
587 587
 				$this->row_label['field'] = esc_attr( $args['row_label']['field'] );
588 588
 			} else {
589 589
 				// If from field is not set correctly, making sure standard is set as the type.
@@ -620,6 +620,6 @@  discard block
 block discarded – undo
620 620
 		if ( false === $config_id ) {
621 621
 			return $translation_strings;
622 622
 		}
623
-		return $translation_strings[ $config_id ];
623
+		return $translation_strings[$config_id];
624 624
 	}
625 625
 }
Please login to merge, or discard this patch.
field/class-kirki-field-gradient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -69,22 +69,22 @@
 block discarded – undo
69 69
 
70 70
 		// Make sure start & end values are arrays.
71 71
 		$value['start'] = ( ! isset( $value['start'] ) ) ? array() : $value['start'];
72
-		$value['end']   = ( ! isset( $value['end'] ) )   ? array() : $value['end'];
72
+		$value['end']   = ( ! isset( $value['end'] ) ) ? array() : $value['end'];
73 73
 
74 74
 		foreach ( array( 'start', 'end' ) as $context ) {
75 75
 
76 76
 			// Sanitize colors.
77
-			if ( ! isset( $value[ $context ]['color'] ) ) {
78
-				$value[ $context ]['color'] = '';
77
+			if ( ! isset( $value[$context]['color'] ) ) {
78
+				$value[$context]['color'] = '';
79 79
 			}
80
-			$value[ $context ]['color'] =  esc_attr( $value[ $context ]['color'] );
80
+			$value[$context]['color'] = esc_attr( $value[$context]['color'] );
81 81
 
82 82
 			// Sanitize positions.
83
-			if ( ! isset( $value[ $context ]['position'] ) ) {
84
-				$value[ $context ]['position'] = 0;
83
+			if ( ! isset( $value[$context]['position'] ) ) {
84
+				$value[$context]['position'] = 0;
85 85
 			};
86
-			$value[ $context ]['position'] = (int) $value[ $context ]['position'];
87
-			$value[ $context ]['position'] = max( min( $value[ $context ]['position'], 100 ), 0 );
86
+			$value[$context]['position'] = (int) $value[$context]['position'];
87
+			$value[$context]['position'] = max( min( $value[$context]['position'], 100 ), 0 );
88 88
 		}
89 89
 
90 90
 		// Sanitize angle.
Please login to merge, or discard this patch.