Passed
Pull Request — master (#2057)
by Aristeides
06:44 queued 01:39
created
modules/postmessage/class-kirki-modules-postmessage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
 		$fields = Kirki::$fields;
67 67
 		$data   = array();
68 68
 		foreach ( $fields as $field ) {
69
-			if ( isset( $field['transport'] ) && 'postMessage' === $field['transport'] && isset( $field['js_vars'] ) && ! empty( $field['js_vars'] ) && is_array( $field['js_vars'] ) && isset( $field['settings'] ) ) {
70
-				$data[] = $field;
69
+			if ( isset( $field[ 'transport' ] ) && 'postMessage' === $field[ 'transport' ] && isset( $field[ 'js_vars' ] ) && ! empty( $field[ 'js_vars' ] ) && is_array( $field[ 'js_vars' ] ) && isset( $field[ 'settings' ] ) ) {
70
+				$data[ ] = $field;
71 71
 			}
72 72
 		}
73 73
 		wp_localize_script( 'kirki_auto_postmessage', 'kirkiPostMessageFields', $data );
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(
@@ -172,11 +172,11 @@  discard block
 block discarded – undo
172 172
 			'kirki-multicolor' => 'Kirki_Output_Field_Multicolor',
173 173
 		);
174 174
 		$field_output_classes = apply_filters( 'kirki_output_control_classnames', $default_classnames );
175
-		$field_output_classes = apply_filters( "kirki_{$field['kirki_config']}_output_control_classnames", $field_output_classes );
175
+		$field_output_classes = apply_filters( "kirki_{$field[ 'kirki_config' ]}_output_control_classnames", $field_output_classes );
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/telemetry/class-kirki-modules-telemetry.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	 */
31 31
 	private static $instance;
32 32
 
33
-    /**
33
+	/**
34 34
 	 * Constructor.
35 35
 	 *
36 36
 	 * @access protected
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -149,23 +149,23 @@  discard block
 block discarded – undo
149 149
 				<tbody>
150 150
 					<tr>
151 151
 						<td style="min-width: 200px;"><?php esc_html_e( 'PHP Version', 'kirki' ); ?></td>
152
-						<td><code><?php echo esc_html( $data['phpVer'] ); ?></code></td>
152
+						<td><code><?php echo esc_html( $data[ 'phpVer' ] ); ?></code></td>
153 153
 					</tr>
154 154
 					<tr>
155 155
 						<td><?php esc_html_e( 'Theme Name', 'kirki' ); ?></td>
156
-						<td><code><?php echo esc_html( $data['themeName'] ); ?></code></td>
156
+						<td><code><?php echo esc_html( $data[ 'themeName' ] ); ?></code></td>
157 157
 					</tr>
158 158
 					<tr>
159 159
 						<td><?php esc_html_e( 'Theme Author', 'kirki' ); ?></td>
160
-						<td><code><?php echo esc_html( $data['themeAuthor'] ); ?></code></td>
160
+						<td><code><?php echo esc_html( $data[ 'themeAuthor' ] ); ?></code></td>
161 161
 					</tr>
162 162
 					<tr>
163 163
 						<td><?php esc_html_e( 'Theme URI', 'kirki' ); ?></td>
164
-						<td><code><?php echo esc_html( $data['themeURI'] ); ?></code></td>
164
+						<td><code><?php echo esc_html( $data[ 'themeURI' ] ); ?></code></td>
165 165
 					</tr>
166 166
 					<tr>
167 167
 						<td><?php esc_html_e( 'Field Types Used', 'kirki' ); ?></td>
168
-						<td><code><?php echo esc_html( implode( ',', $data['fieldTypes'] ) ); ?></code></td>
168
+						<td><code><?php echo esc_html( implode( ',', $data[ 'fieldTypes' ] ) ); ?></code></td>
169 169
 					</tr>
170 170
 				</tbody>
171 171
 				<tfoot>
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 		$php_version = phpversion( 'tidy' );
223 223
 		if ( ! $php_version ) {
224 224
 			$php_version = array_merge( explode( '.', phpversion() ), array( 0, 0 ) );
225
-			$php_version = "{$php_version[0]}.{$php_version[1]}";
225
+			$php_version = "{$php_version[ 0 ]}.{$php_version[ 1 ]}";
226 226
 		}
227 227
 
228 228
 		// Build data and return the array.
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
 	public function get_field_types() {
246 246
 		$types = array();
247 247
 		foreach ( Kirki::$fields as $field ) {
248
-			if ( isset( $field['type'] ) ) {
249
-				$types[] = $field['type'];
248
+			if ( isset( $field[ 'type' ] ) ) {
249
+				$types[ ] = $field[ 'type' ];
250 250
 			}
251 251
 		}
252 252
 		return $types;
@@ -262,10 +262,10 @@  discard block
 block discarded – undo
262 262
 	private function dismiss_notice() {
263 263
 
264 264
 		// Check if this is the request we want.
265
-		if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-hide-notice'] ) ) {
266
-			if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-hide-notice'] ) ) ) {
265
+		if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-hide-notice' ] ) ) {
266
+			if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-hide-notice' ] ) ) ) {
267 267
 				// Check the wp-nonce.
268
-				if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) {
268
+				if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) {
269 269
 					// All good, we can save the option to dismiss this notice.
270 270
 					update_option( 'kirki_telemetry_no_consent', true );
271 271
 				}
@@ -283,10 +283,10 @@  discard block
 block discarded – undo
283 283
 	private function consent() {
284 284
 
285 285
 		// Check if this is the request we want.
286
-		if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-consent-notice'] ) ) {
287
-			if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-consent-notice'] ) ) ) {
286
+		if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-consent-notice' ] ) ) {
287
+			if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-consent-notice' ] ) ) ) {
288 288
 				// Check the wp-nonce.
289
-				if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) {
289
+				if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) {
290 290
 					// All good, we can save the option to dismiss this notice.
291 291
 					update_option( 'kirki_telemetry_optin', true );
292 292
 				}
Please login to merge, or discard this patch.