Passed
Push — development ( a68c4d...46d9de )
by Eric
06:14
created
inc/widgets.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
 		}
20 20
 		$sidebar_widget_count = $_wp_sidebars_widgets;
21 21
 
22
-		if ( isset( $sidebar_widget_count[ $sidebar_id ] ) ) {
23
-			$widget_count   = count( $sidebar_widget_count[ $sidebar_id ] );
24
-			$widget_classes = 'widget-count-' . count( $sidebar_widget_count[ $sidebar_id ] );
22
+		if ( isset( $sidebar_widget_count[$sidebar_id] ) ) {
23
+			$widget_count   = count( $sidebar_widget_count[$sidebar_id] );
24
+			$widget_classes = 'widget-count-' . count( $sidebar_widget_count[$sidebar_id] );
25 25
 
26 26
 			if ( 0 == $widget_count % 4 || $widget_count > 6 ) {
27 27
 				// Four widgets per row if there are exactly four or more than six
Please login to merge, or discard this patch.
inc/custom-comments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 	    <label for="comment">' . _x( 'Comment', 'noun', 'spurs' ) . ( ' <span class="required">*</span>' ) . '</label>
57 57
 	    <textarea class="form-control" id="comment" name="comment" aria-required="true" cols="45" rows="8"></textarea>
58 58
 	    </div>';
59
-		$args['class_submit']  = 'btn btn-secondary'; // since WP 4.1.
59
+		$args['class_submit'] = 'btn btn-secondary'; // since WP 4.1.
60 60
 
61 61
 		return $args;
62 62
 	}
Please login to merge, or discard this patch.
comments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
 			<?php
30 30
 			$comments_number = get_comments_number();
31
-			if ( 1 === (int) $comments_number ) {
31
+			if ( 1 === ( int ) $comments_number ) {
32 32
 				printf(
33 33
 				/* translators: %s: post title */
34 34
 					esc_html_x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'spurs' ),
Please login to merge, or discard this patch.
functions.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@
 block discarded – undo
9 9
 defined( 'ABSPATH' ) || exit;
10 10
 
11 11
 $spurs_includes = array(
12
-	'/theme-settings.php',                  // Initialize theme default settings.
13
-	'/theme-wrapper.php',                   // Load theme wrapper.
14
-	'/setup.php',                           // Theme setup and custom theme supports.
15
-	'/widgets.php',                         // Register widget area.
16
-	'/enqueue.php',                         // Enqueue scripts and styles.
17
-	'/template-tags.php',                   // Custom template tags.
18
-	'/pagination.php',                      // Custom pagination.
19
-	'/hooks.php',                           // Custom hooks.
20
-	'/extras.php',                          // Custom functions that act independently of the theme templates.
21
-	'/customizer.php',                      // Customizer additions.
22
-	'/custom-comments.php',                 // Custom comments.
23
-	'/jetpack.php',                         // Jetpack compatibility.
24
-	'/bootstrap-wp-navwalker.php',          // custom WordPress nav walker.
25
-	'/woocommerce.php',                     // WooCommerce functions.
26
-	'/editor.php',                          // Editor functions.
12
+	'/theme-settings.php', // Initialize theme default settings.
13
+	'/theme-wrapper.php', // Load theme wrapper.
14
+	'/setup.php', // Theme setup and custom theme supports.
15
+	'/widgets.php', // Register widget area.
16
+	'/enqueue.php', // Enqueue scripts and styles.
17
+	'/template-tags.php', // Custom template tags.
18
+	'/pagination.php', // Custom pagination.
19
+	'/hooks.php', // Custom hooks.
20
+	'/extras.php', // Custom functions that act independently of the theme templates.
21
+	'/customizer.php', // Customizer additions.
22
+	'/custom-comments.php', // Custom comments.
23
+	'/jetpack.php', // Jetpack compatibility.
24
+	'/bootstrap-wp-navwalker.php', // custom WordPress nav walker.
25
+	'/woocommerce.php', // WooCommerce functions.
26
+	'/editor.php', // Editor functions.
27 27
 );
28 28
 
29 29
 foreach ( $spurs_includes as $file ) {
Please login to merge, or discard this patch.
inc/template-tags.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			esc_attr( get_the_modified_date( 'c' ) ),
26 26
 			esc_html( get_the_modified_date() )
27 27
 		);
28
-		$posted_on   = apply_filters(
28
+		$posted_on = apply_filters(
29 29
 			'spurs_posted_on', sprintf(
30 30
 				'<span class="posted-on">%1$s <a href="%2$s" rel="bookmark">%3$s</a></span>',
31 31
 				esc_html_x( 'Posted on', 'post date', 'spurs' ),
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 				apply_filters( 'spurs_posted_on_time', $time_string )
34 34
 			)
35 35
 		);
36
-		$byline      = apply_filters(
36
+		$byline = apply_filters(
37 37
 			'spurs_posted_by', sprintf(
38 38
 				'<span class="byline"> %1$s<span class="author vcard"><a class="url fn n" href="%2$s"> %3$s</a></span></span>',
39 39
 				$posted_on ? esc_html_x( 'by', 'post author', 'spurs' ) : esc_html_x( 'Posted by', 'post author', 'spurs' ),
Please login to merge, or discard this patch.
inc/extras.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 		foreach ( $classes as $key => $value ) {
51 51
 			if ( 'tag' == $value ) {
52
-				unset( $classes[ $key ] );
52
+				unset( $classes[$key] );
53 53
 			}
54 54
 		}
55 55
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	}
173 173
 
174 174
 	if ( is_array( $img ) ) {
175
-		$url = $size ? $img['sizes'][ $size ] : $img['url'];
175
+		$url = $size ? $img['sizes'][$size] : $img['url'];
176 176
 	} else {
177 177
 		$url = $img;
178 178
 	}
@@ -238,14 +238,14 @@  discard block
 block discarded – undo
238 238
  * @link //gist.github.com/llgruff/a7ab776167aa0ed307ec445df54e5fdb
239 239
  */
240 240
 if ( defined( 'AIOSEOP_VERSION' ) ) {
241
-	add_action( 'get_header', function () {
241
+	add_action( 'get_header', function() {
242 242
 		ob_start(
243
-			function ( $o ) {
243
+			function( $o ) {
244 244
 				return preg_replace( '/\n?<.*?One SEO Pack.*?>/mi', '', $o );
245 245
 			}
246 246
 		);
247 247
 	} );
248
-	add_action( 'wp_head', function () {
248
+	add_action( 'wp_head', function() {
249 249
 		ob_end_flush();
250 250
 	}, 999 );
251 251
 }
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
  * @link //gist.github.com/paulcollett/4c81c4f6eb85334ba076
256 256
  */
257 257
 if ( defined( 'WPSEO_VERSION' ) ) {
258
-	add_action( 'get_header', function () {
258
+	add_action( 'get_header', function() {
259 259
 		ob_start(
260
-			function ( $o ) {
260
+			function( $o ) {
261 261
 				return preg_replace( '/\n?<.*?yoast.*?>/mi', '', $o );
262 262
 			}
263 263
 		);
264 264
 	} );
265
-	add_action( 'wp_head', function () {
265
+	add_action( 'wp_head', function() {
266 266
 		ob_end_flush();
267 267
 	}, 999 );
268 268
 }
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	$network_active = false;
275 275
 	if ( is_multisite() ) {
276 276
 		$plugins = get_site_option( 'active_sitewide_plugins' );
277
-		if ( isset( $plugins[ $plugin ] ) ) {
277
+		if ( isset( $plugins[$plugin] ) ) {
278 278
 			$network_active = true;
279 279
 		}
280 280
 	}
@@ -283,12 +283,12 @@  discard block
 block discarded – undo
283 283
 }
284 284
 
285 285
 if ( isgabmi_active( 'google-analytics-for-wordpress/googleanalytics.php' ) || isgabmi_active( 'google-analytics-premium/googleanalytics.php' ) ) {
286
-	add_action( 'get_header', function () {
287
-		ob_start( function ( $o ) {
286
+	add_action( 'get_header', function() {
287
+		ob_start( function( $o ) {
288 288
 			return preg_replace( '/\n?<.*?monsterinsights.*?>/mi', '', $o );
289 289
 		} );
290 290
 	} );
291
-	add_action( 'wp_head', function () {
291
+	add_action( 'wp_head', function() {
292 292
 		ob_end_flush();
293 293
 	}, 999 );
294 294
 }
Please login to merge, or discard this patch.
inc/bootstrap-wp-navwalker.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			}
110 110
 			$indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
111 111
 
112
-			$classes = empty( $item->classes ) ? array() : (array) $item->classes;
112
+			$classes = empty( $item->classes ) ? array() : ( array ) $item->classes;
113 113
 
114 114
 			// Initialize some holder variables to store specially handled item
115 115
 			// wrappers and icons.
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 			$attributes = '';
220 220
 			foreach ( $atts as $attr => $value ) {
221 221
 				if ( ! empty( $value ) ) {
222
-					$value      = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
222
+					$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
223 223
 					$attributes .= ' ' . $attr . '="' . $value . '"';
224 224
 				}
225 225
 			}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 				$title         = self::wrap_for_screen_reader( $title );
280 280
 				$keys_to_unset = array_keys( $linkmod_classes, 'sr-only' );
281 281
 				foreach ( $keys_to_unset as $k ) {
282
-					unset( $linkmod_classes[ $k ] );
282
+					unset( $linkmod_classes[$k] );
283 283
 				}
284 284
 			}
285 285
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 			$id_field = $this->db_fields['id'];
336 336
 			// Display this element.
337 337
 			if ( is_object( $args[0] ) ) {
338
-				$args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] );
338
+				$args[0]->has_children = ! empty( $children_elements[$element->$id_field] );
339 339
 			}
340 340
 			parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
341 341
 		}
@@ -423,20 +423,20 @@  discard block
 block discarded – undo
423 423
 				if ( preg_match( '/^disabled|^sr-only/i', $class ) ) {
424 424
 					// Test for .disabled or .sr-only classes.
425 425
 					$linkmod_classes[] = $class;
426
-					unset( $classes[ $key ] );
426
+					unset( $classes[$key] );
427 427
 				} elseif ( preg_match( '/^dropdown-header|^dropdown-divider|^dropdown-item-text/i', $class ) && $depth > 0 ) {
428 428
 					// Test for .dropdown-header or .dropdown-divider and a
429 429
 					// depth greater than 0 - IE inside a dropdown.
430 430
 					$linkmod_classes[] = $class;
431
-					unset( $classes[ $key ] );
431
+					unset( $classes[$key] );
432 432
 				} elseif ( preg_match( '/^fa-(\S*)?|^fa(s|r|l|b)?(\s?)?$/i', $class ) ) {
433 433
 					// Font Awesome.
434 434
 					$icon_classes[] = $class;
435
-					unset( $classes[ $key ] );
435
+					unset( $classes[$key] );
436 436
 				} elseif ( preg_match( '/^glyphicon-(\S*)?|^glyphicon(\s?)$/i', $class ) ) {
437 437
 					// Glyphicons.
438 438
 					$icon_classes[] = $class;
439
-					unset( $classes[ $key ] );
439
+					unset( $classes[$key] );
440 440
 				}
441 441
 			}
442 442
 
Please login to merge, or discard this patch.