Passed
Push — develop ( a1ce48...859234 )
by Aristeides
05:21
created
field/class-kirki-field-typography.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
 	protected function set_default() {
50 50
 
51 51
 		// Accomodate the use of font-weight and convert to variant.
52
-		if ( isset( $this->default['font-weight'] ) ) {
53
-			$this->default['variant'] = ( 'regular' === $this->default['font-weight'] ) ? 400 : (string) intval( $this->default['font-weight'] );
52
+		if ( isset( $this->default[ 'font-weight' ] ) ) {
53
+			$this->default[ 'variant' ] = ( 'regular' === $this->default[ 'font-weight' ] ) ? 400 : (string) intval( $this->default[ 'font-weight' ] );
54 54
 		}
55 55
 
56 56
 		// Make sure letter-spacing has units.
57
-		if ( isset( $this->default['letter-spacing'] ) && is_numeric( $this->default['letter-spacing'] ) && $this->default['letter-spacing'] ) {
58
-			$this->default['letter-spacing'] .= 'px';
57
+		if ( isset( $this->default[ 'letter-spacing' ] ) && is_numeric( $this->default[ 'letter-spacing' ] ) && $this->default[ 'letter-spacing' ] ) {
58
+			$this->default[ 'letter-spacing' ] .= 'px';
59 59
 		}
60 60
 	}
61 61
 
@@ -106,15 +106,15 @@  discard block
 block discarded – undo
106 106
 			foreach ( $this->output as $output ) {
107 107
 
108 108
 				// If 'element' or 'property' are not defined, skip this.
109
-				if ( ! isset( $output['element'] ) ) {
109
+				if ( ! isset( $output[ 'element' ] ) ) {
110 110
 					continue;
111 111
 				}
112
-				if ( is_array( $output['element'] ) ) {
113
-					$output['element'] = implode( ',', $output['element'] );
112
+				if ( is_array( $output[ 'element' ] ) ) {
113
+					$output[ 'element' ] = implode( ',', $output[ 'element' ] );
114 114
 				}
115 115
 
116 116
 				// If we got this far, it's safe to add this.
117
-				$js_vars[] = $output;
117
+				$js_vars[ ] = $output;
118 118
 			}
119 119
 
120 120
 			// Did we manage to get all the items from 'output'?
@@ -146,26 +146,26 @@  discard block
 block discarded – undo
146 146
 		foreach ( $value as $key => $val ) {
147 147
 			switch ( $key ) {
148 148
 				case 'font-family':
149
-					$value['font-family'] = esc_attr( $val );
149
+					$value[ 'font-family' ] = esc_attr( $val );
150 150
 					break;
151 151
 				case 'font-weight':
152
-					if ( isset( $value['variant'] ) ) {
152
+					if ( isset( $value[ 'variant' ] ) ) {
153 153
 						break;
154 154
 					}
155
-					$value['variant'] = $val;
156
-					if ( isset( $value['font-style'] ) && 'italic' === $value['font-style'] ) {
157
-						$value['variant'] = ( '400' !== $val || 400 !== $val ) ? $value['variant'] . 'italic' : 'italic';
155
+					$value[ 'variant' ] = $val;
156
+					if ( isset( $value[ 'font-style' ] ) && 'italic' === $value[ 'font-style' ] ) {
157
+						$value[ 'variant' ] = ( '400' !== $val || 400 !== $val ) ? $value[ 'variant' ] . 'italic' : 'italic';
158 158
 					}
159 159
 					break;
160 160
 				case 'variant':
161 161
 					// Use 'regular' instead of 400 for font-variant.
162
-					$value['variant'] = ( 400 === $val || '400' === $val ) ? 'regular' : $val;
162
+					$value[ 'variant' ] = ( 400 === $val || '400' === $val ) ? 'regular' : $val;
163 163
 					// Get font-weight from variant.
164
-					$value['font-weight'] = filter_var( $value['variant'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
165
-					$value['font-weight'] = ( 'regular' === $value['variant'] || 'italic' === $value['variant'] ) ? 400 : absint( $value['font-weight'] );
164
+					$value[ 'font-weight' ] = filter_var( $value[ 'variant' ], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
165
+					$value[ 'font-weight' ] = ( 'regular' === $value[ 'variant' ] || 'italic' === $value[ 'variant' ] ) ? 400 : absint( $value[ 'font-weight' ] );
166 166
 					// Get font-style from variant.
167
-					if ( ! isset( $value['font-style'] ) ) {
168
-						$value['font-style'] = ( false === strpos( $value['variant'], 'italic' ) ) ? 'normal' : 'italic';
167
+					if ( ! isset( $value[ 'font-style' ] ) ) {
168
+						$value[ 'font-style' ] = ( false === strpos( $value[ 'variant' ], 'italic' ) ) ? 'normal' : 'italic';
169 169
 					}
170 170
 					break;
171 171
 				case 'font-size':
@@ -176,21 +176,21 @@  discard block
 block discarded – undo
176 176
 					break;
177 177
 				case 'text-align':
178 178
 					if ( ! in_array( $val, array( '', 'inherit', 'left', 'center', 'right', 'justify' ), true ) ) {
179
-						$value['text-align'] = '';
179
+						$value[ 'text-align' ] = '';
180 180
 					}
181 181
 					break;
182 182
 				case 'text-transform':
183 183
 					if ( ! in_array( $val, array( '', 'none', 'capitalize', 'uppercase', 'lowercase', 'initial', 'inherit' ), true ) ) {
184
-						$value['text-transform'] = '';
184
+						$value[ 'text-transform' ] = '';
185 185
 					}
186 186
 					break;
187 187
 				case 'text-decoration':
188 188
 					if ( ! in_array( $val, array( '', 'none', 'underline', 'overline', 'line-through', 'initial', 'inherit' ), true ) ) {
189
-						$value['text-transform'] = '';
189
+						$value[ 'text-transform' ] = '';
190 190
 					}
191 191
 					break;
192 192
 				case 'color':
193
-					$value['color'] = '' === $value['color'] ? '' : ariColor::newColor( $val )->toCSS( 'hex' );
193
+					$value[ 'color' ] = '' === $value[ 'color' ] ? '' : ariColor::newColor( $val )->toCSS( 'hex' );
194 194
 					break;
195 195
 			}
196 196
 		}
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/tooltips/class-kirki-modules-tooltips.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,13 +76,13 @@
 block discarded – undo
76 76
 
77 77
 		$fields = Kirki::$fields;
78 78
 		foreach ( $fields as $field ) {
79
-			if ( isset( $field['tooltip'] ) && ! empty( $field['tooltip'] ) ) {
79
+			if ( isset( $field[ 'tooltip' ] ) && ! empty( $field[ 'tooltip' ] ) ) {
80 80
 				// Get the control ID and properly format it for the tooltips.
81
-				$id = str_replace( '[', '-', str_replace( ']', '', $field['settings'] ) );
81
+				$id = str_replace( '[', '-', str_replace( ']', '', $field[ 'settings' ] ) );
82 82
 				// Add the tooltips content.
83 83
 				$this->tooltips_content[ $id ] = array(
84 84
 					'id'      => $id,
85
-					'content' => wp_kses_post( $field['tooltip'] ),
85
+					'content' => wp_kses_post( $field[ 'tooltip' ] ),
86 86
 				);
87 87
 			}
88 88
 		}
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-styling/class-kirki-modules-customizer-styling.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 	public function custom_css() {
67 67
 
68 68
 		$config = apply_filters( 'kirki_config', array() );
69
-		if ( ! isset( $config['color_accent'] ) && ! isset( $config['color_back'] ) ) {
69
+		if ( ! isset( $config[ 'color_accent' ] ) && ! isset( $config[ 'color_back' ] ) ) {
70 70
 			return;
71 71
 		}
72
-		$back = isset( $config['color_back'] ) ? $config['color_back'] : false;
72
+		$back = isset( $config[ 'color_back' ] ) ? $config[ 'color_back' ] : false;
73 73
 
74 74
 		$text_on_back              = '';
75 75
 		$border_on_back            = '';
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 			$hover_on_back  = ( 90 < $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness - 3 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness + 3 )->toCSS( $back_obj->mode );
92 92
 			$arrows_on_back = ( 50 > $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness + 30 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness - 30 )->toCSS( $back_obj->mode );
93 93
 		}
94
-		$accent = ( isset( $config['color_accent'] ) ) ? $config['color_accent'] : false;
94
+		$accent = ( isset( $config[ 'color_accent' ] ) ) ? $config[ 'color_accent' ] : false;
95 95
 		if ( $accent ) {
96 96
 			$accent_obj                = ariColor::newColor( $accent );
97 97
 			$text_on_accent            = ( 60 > $accent_obj->lightness ) ? $accent_obj->getNew( 'lightness', $accent_obj->lightness + 60 )->toCSS( $accent_obj->mode ) : $accent_obj->getNew( 'lightness', $accent_obj->lightness - 60 )->toCSS( $accent_obj->mode );
@@ -403,18 +403,18 @@  discard block
 block discarded – undo
403 403
 			color: #444 !important;
404 404
 		}
405 405
 
406
-		<?php if ( isset( $config['width'] ) ) : ?>
406
+		<?php if ( isset( $config[ 'width' ] ) ) : ?>
407 407
 			.wp-full-overlay-sidebar {
408
-				width: <?php echo esc_attr( $config['width'] ); ?>;
408
+				width: <?php echo esc_attr( $config[ 'width' ] ); ?>;
409 409
 			}
410 410
 			.expanded .wp-full-overlay-footer {
411
-				width: <?php echo esc_attr( $config['width'] ); ?>;
411
+				width: <?php echo esc_attr( $config[ 'width' ] ); ?>;
412 412
 			}
413 413
 			.wp-full-overlay.expanded {
414
-				margin-left: <?php echo esc_attr( $config['width'] ); ?>;
414
+				margin-left: <?php echo esc_attr( $config[ 'width' ] ); ?>;
415 415
 			}
416 416
 			.wp-full-overlay.collapsed .wp-full-overlay-sidebar {
417
-				margin-left: -<?php echo esc_attr( $config['width'] ); ?>;
417
+				margin-left: -<?php echo esc_attr( $config[ 'width' ] ); ?>;
418 418
 			}
419 419
 		<?php endif; ?>
420 420
 		</style>
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
@@ -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,39 +58,39 @@  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' ), true ) ) ? '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(
85 85
 					$property, array(
86
-						$value['font-family'],
87
-						$value['font-backup'],
86
+						$value[ 'font-family' ],
87
+						$value[ 'font-backup' ],
88 88
 					)
89 89
 				);
90 90
 			}
91
-			$property       = ( isset( $output['choice'] ) && isset( $output['property'] ) ) ? $output['property'] : $property;
92
-			$property_value = ( is_array( $property_value ) && isset( $property_value[0] ) ) ? $property_value[0] : $property_value;
93
-			$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $property_value . $output['suffix'];
91
+			$property       = ( isset( $output[ 'choice' ] ) && isset( $output[ 'property' ] ) ) ? $output[ 'property' ] : $property;
92
+			$property_value = ( is_array( $property_value ) && isset( $property_value[ 0 ] ) ) ? $property_value[ 0 ] : $property_value;
93
+			$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $property ] = $output[ 'prefix' ] . $property_value . $output[ 'suffix' ];
94 94
 		}
95 95
 	}
96 96
 }
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
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	protected function process_output( $output, $value ) {
25 25
 
26
-		if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) {
26
+		if ( ! isset( $output[ 'element' ] ) || ! isset( $output[ 'property' ] ) ) {
27 27
 			return;
28 28
 		}
29 29
 		$output = wp_parse_args(
@@ -35,16 +35,16 @@  discard block
 block discarded – undo
35 35
 			)
36 36
 		);
37 37
 		if ( is_array( $value ) ) {
38
-			if ( isset( $output['choice'] ) && $output['choice'] ) {
39
-				$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value[ $output['choice'] ] ) . $output['units'] . $output['suffix'];
38
+			if ( isset( $output[ 'choice' ] ) && $output[ 'choice' ] ) {
39
+				$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $output[ 'property' ] ] = $output[ 'prefix' ] . $this->process_property_value( $output[ 'property' ], $value[ $output[ 'choice' ] ] ) . $output[ 'units' ] . $output[ 'suffix' ];
40 40
 				return;
41 41
 			}
42
-			if ( isset( $value['url'] ) ) {
43
-				$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value['url'] ) . $output['units'] . $output['suffix'];
42
+			if ( isset( $value[ 'url' ] ) ) {
43
+				$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $output[ 'property' ] ] = $output[ 'prefix' ] . $this->process_property_value( $output[ 'property' ], $value[ 'url' ] ) . $output[ 'units' ] . $output[ 'suffix' ];
44 44
 				return;
45 45
 			}
46 46
 			return;
47 47
 		}
48
-		$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value ) . $output['units'] . $output['suffix'];
48
+		$this->styles[ $output[ 'media_query' ] ][ $output[ 'element' ] ][ $output[ 'property' ] ] = $output[ 'prefix' ] . $this->process_property_value( $output[ 'property' ], $value ) . $output[ 'units' ] . $output[ 'suffix' ];
49 49
 	}
50 50
 }
Please login to merge, or discard this patch.
modules/css/class-kirki-modules-css-generator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -146,10 +146,10 @@  discard block
 block discarded – undo
146 146
 	public static function css( $field ) {
147 147
 
148 148
 		// Set class vars.
149
-		self::$settings   = $field['settings'];
150
-		self::$callback   = $field['sanitize_callback'];
151
-		self::$field_type = $field['type'];
152
-		self::$output     = $field['output'];
149
+		self::$settings   = $field[ 'settings' ];
150
+		self::$callback   = $field[ 'sanitize_callback' ];
151
+		self::$field_type = $field[ 'type' ];
152
+		self::$output     = $field[ 'output' ];
153 153
 		if ( ! is_array( self::$output ) ) {
154 154
 			self::$output = array(
155 155
 				array(
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		// Find the class that will handle the outpout for this field.
166 166
 		$classname            = 'Kirki_Output';
167 167
 		$field_output_classes = apply_filters(
168
-			"kirki_{$field['kirki_config']}_output_control_classnames", array(
168
+			"kirki_{$field[ 'kirki_config' ]}_output_control_classnames", array(
169 169
 				'kirki-background' => 'Kirki_Output_Field_Background',
170 170
 				'kirki-dimensions' => 'Kirki_Output_Field_Dimensions',
171 171
 				'kirki-image'      => 'Kirki_Output_Field_Image',
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		if ( array_key_exists( self::$field_type, $field_output_classes ) ) {
177 177
 			$classname = $field_output_classes[ self::$field_type ];
178 178
 		}
179
-		$obj = new $classname( $field['kirki_config'], self::$output, self::$value, $field );
179
+		$obj = new $classname( $field[ 'kirki_config' ], self::$output, self::$value, $field );
180 180
 		return $obj->get_styles();
181 181
 
182 182
 	}
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.