@@ -56,7 +56,7 @@ |
||
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 | } |
@@ -109,7 +109,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | // Only apply changes if sidebar ID is set and the widget's classes depend on the number of widgets in the sidebar. |
60 | 60 | if ( isset( $params[0]['id'] ) && strpos( $params[0]['before_widget'], 'dynamic-classes' ) ) { |
61 | 61 | $sidebar_id = $params[0]['id']; |
62 | - $widget_count = count( $sidebars_widgets_count[ $sidebar_id ] ); |
|
62 | + $widget_count = count( $sidebars_widgets_count[$sidebar_id] ); |
|
63 | 63 | |
64 | 64 | $widget_classes = 'widget-count-' . $widget_count; |
65 | 65 | if ( 0 === $widget_count % 4 || $widget_count > 6 ) { |
@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | * @link //gist.github.com/llgruff/a7ab776167aa0ed307ec445df54e5fdb |
24 | 24 | */ |
25 | 25 | if ( defined( 'AIOSEOP_VERSION' ) ) { |
26 | - add_action( 'get_header', function () { |
|
26 | + add_action( 'get_header', function() { |
|
27 | 27 | ob_start( |
28 | - function ( $o ) { |
|
28 | + function( $o ) { |
|
29 | 29 | return preg_replace( '/\n?<.*?One SEO Pack.*?>/mi', '', $o ); |
30 | 30 | } |
31 | 31 | ); |
32 | 32 | } ); |
33 | - add_action( 'wp_head', function () { |
|
33 | + add_action( 'wp_head', function() { |
|
34 | 34 | ob_end_flush(); |
35 | 35 | }, 999 ); |
36 | 36 | } |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | * @link //gist.github.com/paulcollett/4c81c4f6eb85334ba076 |
42 | 42 | */ |
43 | 43 | if ( defined( 'WPSEO_VERSION' ) ) { |
44 | - add_action( 'get_header', function () { |
|
44 | + add_action( 'get_header', function() { |
|
45 | 45 | ob_start( |
46 | - function ( $o ) { |
|
46 | + function( $o ) { |
|
47 | 47 | return preg_replace( '/^<!--.*?[Y]oast.*?-->$/mi', '', $o ); |
48 | 48 | } |
49 | 49 | ); |
50 | 50 | } ); |
51 | - add_action( 'wp_head', function () { |
|
51 | + add_action( 'wp_head', function() { |
|
52 | 52 | ob_end_flush(); |
53 | 53 | }, 999 ); |
54 | 54 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $network_active = false; |
62 | 62 | if ( is_multisite() ) { |
63 | 63 | $plugins = get_site_option( 'active_sitewide_plugins' ); |
64 | - if ( isset( $plugins[ $plugin ] ) ) { |
|
64 | + if ( isset( $plugins[$plugin] ) ) { |
|
65 | 65 | $network_active = true; |
66 | 66 | } |
67 | 67 | } |
@@ -70,12 +70,12 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | if ( isgabmi_active( 'google-analytics-for-wordpress/googleanalytics.php' ) || isgabmi_active( 'google-analytics-premium/googleanalytics.php' ) ) { |
73 | - add_action( 'get_header', function () { |
|
74 | - ob_start( function ( $o ) { |
|
73 | + add_action( 'get_header', function() { |
|
74 | + ob_start( function( $o ) { |
|
75 | 75 | return preg_replace( '/\n?<.*?monsterinsights.*?>/mi', '', $o ); |
76 | 76 | } ); |
77 | 77 | } ); |
78 | - add_action( 'wp_head', function () { |
|
78 | + add_action( 'wp_head', function() { |
|
79 | 79 | ob_end_flush(); |
80 | 80 | }, 999 ); |
81 | 81 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | <?php |
33 | 33 | $comments_number = get_comments_number(); |
34 | - if ( 1 === (int) $comments_number ) { |
|
34 | + if ( 1 === ( int ) $comments_number ) { |
|
35 | 35 | printf( |
36 | 36 | /* translators: %s: post title */ |
37 | 37 | esc_html_x( 'One thought on “%s”', 'comments title', 'spurs' ), |
@@ -9,24 +9,24 @@ |
||
9 | 9 | defined( 'ABSPATH' ) || exit; |
10 | 10 | |
11 | 11 | $spurs_includes = array( |
12 | - '/custom-cpt.php', // Initialize theme default settings. |
|
13 | - '/theme-settings.php', // Initialize theme default settings. |
|
14 | - '/theme-wrapper.php', // Load theme wrapper. |
|
15 | - '/setup.php', // Theme setup and custom theme supports. |
|
16 | - '/widgets.php', // Register widget area. |
|
17 | - '/enqueue.php', // Enqueue scripts and styles. |
|
18 | - '/template-tags.php', // Custom template tags. |
|
19 | - '/pagination.php', // Custom pagination. |
|
20 | - '/load-more.php', // Custom Load More. |
|
21 | - '/hooks.php', // Custom hooks. |
|
22 | - '/extras.php', // Custom functions that act independently of the theme templates. |
|
23 | - '/customizer.php', // Customizer additions. |
|
24 | - '/custom-comments.php', // Custom comments. |
|
25 | - '/jetpack.php', // Jetpack compatibility. |
|
26 | - '/bootstrap-wp-navwalker.php', // custom WordPress nav walker. |
|
27 | - '/woocommerce.php', // WooCommerce functions. |
|
28 | - '/editor.php', // Editor functions. |
|
29 | - '/cleanup.php', // Editor functions. |
|
12 | + '/custom-cpt.php', // Initialize theme default settings. |
|
13 | + '/theme-settings.php', // Initialize theme default settings. |
|
14 | + '/theme-wrapper.php', // Load theme wrapper. |
|
15 | + '/setup.php', // Theme setup and custom theme supports. |
|
16 | + '/widgets.php', // Register widget area. |
|
17 | + '/enqueue.php', // Enqueue scripts and styles. |
|
18 | + '/template-tags.php', // Custom template tags. |
|
19 | + '/pagination.php', // Custom pagination. |
|
20 | + '/load-more.php', // Custom Load More. |
|
21 | + '/hooks.php', // Custom hooks. |
|
22 | + '/extras.php', // Custom functions that act independently of the theme templates. |
|
23 | + '/customizer.php', // Customizer additions. |
|
24 | + '/custom-comments.php', // Custom comments. |
|
25 | + '/jetpack.php', // Jetpack compatibility. |
|
26 | + '/bootstrap-wp-navwalker.php', // custom WordPress nav walker. |
|
27 | + '/woocommerce.php', // WooCommerce functions. |
|
28 | + '/editor.php', // Editor functions. |
|
29 | + '/cleanup.php', // Editor functions. |
|
30 | 30 | ); |
31 | 31 | |
32 | 32 | foreach ( $spurs_includes as $file ) { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | ); |
61 | 61 | echo $posted_on . $byline; |
62 | 62 | if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { |
63 | - echo $updated_on;// WPCS: XSS OK. |
|
63 | + echo $updated_on; // WPCS: XSS OK. |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * <div class="<?php spurs_column_classes(); ?>" id="primary"> |
249 | 249 | */ |
250 | 250 | function spurs_column_classes() { |
251 | - $html = ''; |
|
251 | + $html = ''; |
|
252 | 252 | |
253 | 253 | if ( is_page_template( 'page-templates/sidebar-left.php' ) && is_active_sidebar( 'sidebar-left' ) ) { |
254 | 254 | $html .= 'col-md-8 left-sidebar-template'; |
@@ -49,7 +49,7 @@ discard block |
||
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 | |
@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | */ |
181 | 181 | if ( ! function_exists( 'bg' ) ) { |
182 | 182 | |
183 | - function bg($img, $size = '', $echo = true, $additional_style = '') { |
|
183 | + function bg( $img, $size = '', $echo = true, $additional_style = '' ) { |
|
184 | 184 | if ( ! $img ) { |
185 | 185 | return; |
186 | 186 | } |
187 | 187 | |
188 | 188 | if ( is_array( $img ) ) { |
189 | - $url = $size ? $img['sizes'][ $size ] : $img['url']; |
|
189 | + $url = $size ? $img['sizes'][$size] : $img['url']; |
|
190 | 190 | } else { |
191 | 191 | $url = $img; |
192 | 192 | } |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | spurs_register_taxonomies(); |
271 | 271 | } |
272 | 272 | |
273 | -function spurs_register_cpts(){ |
|
273 | +function spurs_register_cpts() { |
|
274 | 274 | |
275 | 275 | $cpts[] = array( |
276 | 276 | 'name' => 'report', |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | add_action( 'wp_enqueue_scripts', 'spurs_scripts' ); |
36 | 36 | |
37 | -add_action('admin_head', 'spurs_admin_inline_styles'); |
|
37 | +add_action( 'admin_head', 'spurs_admin_inline_styles' ); |
|
38 | 38 | function spurs_admin_inline_styles() { |
39 | 39 | echo '<style> |
40 | 40 | .wp-block{max-width: 1070px} |