@@ -19,9 +19,9 @@ |
||
| 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 |
@@ -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 | } |
@@ -30,15 +30,15 @@ |
||
| 30 | 30 | $fields = array( |
| 31 | 31 | 'author' => '<div class="form-group comment-form-author"><label for="author">' . __( 'Name', |
| 32 | 32 | 'spurs' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . |
| 33 | - '<input class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . '></div>', |
|
| 33 | + '<input class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . '></div>', |
|
| 34 | 34 | 'email' => '<div class="form-group comment-form-email"><label for="email">' . __( 'Email', |
| 35 | 35 | 'spurs' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . |
| 36 | - '<input class="form-control" id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . '></div>', |
|
| 36 | + '<input class="form-control" id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . '></div>', |
|
| 37 | 37 | 'url' => '<div class="form-group comment-form-url"><label for="url">' . __( 'Website', |
| 38 | 38 | 'spurs' ) . '</label> ' . |
| 39 | - '<input class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"></div>', |
|
| 39 | + '<input class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"></div>', |
|
| 40 | 40 | 'cookies' => '<div class="form-group form-check comment-form-cookies-consent"><input class="form-check-input" id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' /> ' . |
| 41 | - '<label class="form-check-label" for="wp-comment-cookies-consent">' . __( 'Save my name, email, and website in this browser for the next time I comment', 'spurs' ) . '</label></div>', |
|
| 41 | + '<label class="form-check-label" for="wp-comment-cookies-consent">' . __( 'Save my name, email, and website in this browser for the next time I comment', 'spurs' ) . '</label></div>', |
|
| 42 | 42 | ); |
| 43 | 43 | |
| 44 | 44 | return $fields; |
@@ -28,7 +28,7 @@ |
||
| 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 “%s”', 'comments title', 'spurs' ), |
@@ -23,11 +23,14 @@ |
||
| 23 | 23 | |
| 24 | 24 | <?php if ( ! $load_address ) : ?> |
| 25 | 25 | <?php wc_get_template( 'myaccount/my-address.php' ); ?> |
| 26 | -<?php else : ?> |
|
| 26 | +<?php else { |
|
| 27 | + : ?> |
|
| 27 | 28 | |
| 28 | 29 | <form method="post"> |
| 29 | 30 | |
| 30 | - <h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title, $load_address ); ?></h3><?php // @codingStandardsIgnoreLine ?> |
|
| 31 | + <h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title, $load_address ); |
|
| 32 | +} |
|
| 33 | +?></h3><?php // @codingStandardsIgnoreLine ?> |
|
| 31 | 34 | |
| 32 | 35 | <div class="woocommerce-address-fields"> |
| 33 | 36 | <?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?> |
@@ -232,7 +232,7 @@ |
||
| 232 | 232 | $html .= 'col-md-3 widget-area'; |
| 233 | 233 | echo $html; // WPCS: XSS OK. |
| 234 | 234 | } elseif ( ( is_page_template( 'page-templates/left-sidebar.php' ) && is_active_sidebar( 'sidebar-left' ) ) || |
| 235 | - ( is_page_template( 'page-templates/right-sidebar.php' ) && is_active_sidebar( 'sidebar-right' ) ) ) { |
|
| 235 | + ( is_page_template( 'page-templates/right-sidebar.php' ) && is_active_sidebar( 'sidebar-right' ) ) ) { |
|
| 236 | 236 | $html .= 'col-md-4 widget-area'; |
| 237 | 237 | echo $html; // WPCS: XSS OK. |
| 238 | 238 | } elseif ( ( 'right' === $spurs_sidebar_position || 'left' === $spurs_sidebar_position ) && ( is_active_sidebar( 'sidebar-right' ) || is_active_sidebar( 'sidebar-left' ) ) ) { |
@@ -25,7 +25,7 @@ discard block |
||
| 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 |
||
| 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' ), |
@@ -17,7 +17,8 @@ |
||
| 17 | 17 | |
| 18 | 18 | defined( 'ABSPATH' ) || exit; |
| 19 | 19 | |
| 20 | -if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine. |
|
| 20 | +if ( ! wc_coupons_enabled() ) { |
|
| 21 | +// @codingStandardsIgnoreLine. |
|
| 21 | 22 | return; |
| 22 | 23 | } |
| 23 | 24 | |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | get_template_part( 'templates/loop/content', get_post_format() ); |
| 24 | 24 | endwhile; |
| 25 | -else : |
|
| 25 | +else { |
|
| 26 | + : |
|
| 26 | 27 | get_template_part( 'templates/loop/content', 'none' ); |
| 28 | +} |
|
| 27 | 29 | endif; |
| 28 | 30 | |
@@ -9,21 +9,21 @@ |
||
| 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 ) { |
@@ -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 | |
@@ -172,7 +172,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |