@@ -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 |
@@ -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' ), |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | <div class="woocommerce-address-fields__field-wrapper"> |
| 36 | 36 | <?php |
| 37 | 37 | foreach ( $address as $key => $field ) { |
| 38 | - if ( isset( $field['country_field'], $address[ $field['country_field'] ] ) ) { |
|
| 39 | - $field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[ $field['country_field'] ]['value'] ); |
|
| 38 | + if ( isset( $field['country_field'], $address[$field['country_field']] ) ) { |
|
| 39 | + $field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[$field['country_field']]['value'] ); |
|
| 40 | 40 | } |
| 41 | 41 | woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) ); |
| 42 | 42 | } |
@@ -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}" ); ?> |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | $indent = ( $depth ) ? str_repeat( $t, $depth ) : ''; |
| 109 | 109 | |
| 110 | - $classes = empty( $item->classes ) ? array() : (array) $item->classes; |
|
| 110 | + $classes = empty( $item->classes ) ? array() : ( array ) $item->classes; |
|
| 111 | 111 | |
| 112 | 112 | // Initialize some holder variables to store specially handled item |
| 113 | 113 | // wrappers and icons. |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | $title = self::wrap_for_screen_reader( $title ); |
| 271 | 271 | $keys_to_unset = array_keys( $linkmod_classes, 'sr-only' ); |
| 272 | 272 | foreach ( $keys_to_unset as $k ) { |
| 273 | - unset( $linkmod_classes[ $k ] ); |
|
| 273 | + unset( $linkmod_classes[$k] ); |
|
| 274 | 274 | } |
| 275 | 275 | } |
| 276 | 276 | |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | $id_field = $this->db_fields['id']; |
| 325 | 325 | // Display this element. |
| 326 | 326 | if ( is_object( $args[0] ) ) { |
| 327 | - $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); } |
|
| 327 | + $args[0]->has_children = ! empty( $children_elements[$element->$id_field] ); } |
|
| 328 | 328 | parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
| 329 | 329 | } |
| 330 | 330 | |
@@ -408,20 +408,20 @@ discard block |
||
| 408 | 408 | if ( preg_match( '/^disabled|^sr-only/i', $class ) ) { |
| 409 | 409 | // Test for .disabled or .sr-only classes. |
| 410 | 410 | $linkmod_classes[] = $class; |
| 411 | - unset( $classes[ $key ] ); |
|
| 411 | + unset( $classes[$key] ); |
|
| 412 | 412 | } elseif ( preg_match( '/^dropdown-header|^dropdown-divider|^dropdown-item-text/i', $class ) && $depth > 0 ) { |
| 413 | 413 | // Test for .dropdown-header or .dropdown-divider and a |
| 414 | 414 | // depth greater than 0 - IE inside a dropdown. |
| 415 | 415 | $linkmod_classes[] = $class; |
| 416 | - unset( $classes[ $key ] ); |
|
| 416 | + unset( $classes[$key] ); |
|
| 417 | 417 | } elseif ( preg_match( '/^fa-(\S*)?|^fa(s|r|l|b)?(\s?)?$/i', $class ) ) { |
| 418 | 418 | // Font Awesome. |
| 419 | 419 | $icon_classes[] = $class; |
| 420 | - unset( $classes[ $key ] ); |
|
| 420 | + unset( $classes[$key] ); |
|
| 421 | 421 | } elseif ( preg_match( '/^glyphicon-(\S*)?|^glyphicon(\s?)$/i', $class ) ) { |
| 422 | 422 | // Glyphicons. |
| 423 | 423 | $icon_classes[] = $class; |
| 424 | - unset( $classes[ $key ] ); |
|
| 424 | + unset( $classes[$key] ); |
|
| 425 | 425 | } |
| 426 | 426 | } |
| 427 | 427 | |
@@ -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' ) ) ) { |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | esc_attr( get_the_modified_date( 'c' ) ), |
| 23 | 23 | esc_html( get_the_modified_date() ) |
| 24 | 24 | ); |
| 25 | - $posted_on = apply_filters( |
|
| 25 | + $posted_on = apply_filters( |
|
| 26 | 26 | 'spurs_posted_on', sprintf( |
| 27 | 27 | '<span class="posted-on">%1$s <a href="%2$s" rel="bookmark">%3$s</a></span>', |
| 28 | 28 | esc_html_x( 'Posted on', 'post date', 'spurs' ), |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | apply_filters( 'spurs_posted_on_time', $time_string ) |
| 31 | 31 | ) |
| 32 | 32 | ); |
| 33 | - $byline = apply_filters( |
|
| 33 | + $byline = apply_filters( |
|
| 34 | 34 | 'spurs_posted_by', sprintf( |
| 35 | 35 | '<span class="byline"> %1$s<span class="author vcard"><a class="url fn n" href="%2$s"> %3$s</a></span></span>', |
| 36 | 36 | $posted_on ? esc_html_x( 'by', 'post author', 'spurs' ) : esc_html_x( 'Posted by', 'post author', 'spurs' ), |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | function spurs_content_classes() { |
| 171 | 171 | $spurs_sidebar_position = get_theme_mod( 'spurs_sidebar_position' ); |
| 172 | - $html = ''; |
|
| 172 | + $html = ''; |
|
| 173 | 173 | |
| 174 | 174 | if ( is_page_template( 'page-templates/left-sidebar.php' ) && is_active_sidebar( 'sidebar-left' ) ) { |
| 175 | 175 | $html .= 'left-sidebar-template col-md-8 content-area'; |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | function spurs_sidebar_classes() { |
| 227 | 227 | |
| 228 | 228 | $spurs_sidebar_position = get_theme_mod( 'spurs_sidebar_position' ); |
| 229 | - $html = ''; |
|
| 229 | + $html = ''; |
|
| 230 | 230 | |
| 231 | 231 | if ( is_page_template( 'page-templates/both-sidebars.php' ) && ( is_active_sidebar( 'sidebar-left' ) ) && is_active_sidebar( 'sidebar-right' ) ) { |
| 232 | 232 | $html .= 'col-md-3 widget-area'; |
@@ -31,15 +31,15 @@ |
||
| 31 | 31 | $fields = array( |
| 32 | 32 | 'author' => '<div class="form-group comment-form-author"><label for="author">' . __( 'Name', |
| 33 | 33 | 'spurs' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . |
| 34 | - '<input class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . '></div>', |
|
| 34 | + '<input class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . '></div>', |
|
| 35 | 35 | 'email' => '<div class="form-group comment-form-email"><label for="email">' . __( 'Email', |
| 36 | 36 | 'spurs' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . |
| 37 | - '<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 | + '<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>', |
|
| 38 | 38 | 'url' => '<div class="form-group comment-form-url"><label for="url">' . __( 'Website', |
| 39 | 39 | 'spurs' ) . '</label> ' . |
| 40 | - '<input class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"></div>', |
|
| 40 | + '<input class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"></div>', |
|
| 41 | 41 | '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 . ' /> ' . |
| 42 | - '<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 | + '<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>', |
|
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | return $fields; |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $req = get_option( 'require_name_email' ); |
| 28 | 28 | $aria_req = ( $req ? " aria-required='true'" : '' ); |
| 29 | 29 | $html5 = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0; |
| 30 | - $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; |
|
| 30 | + $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; |
|
| 31 | 31 | $fields = array( |
| 32 | 32 | 'author' => '<div class="form-group comment-form-author"><label for="author">' . __( 'Name', |
| 33 | 33 | 'spurs' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . |
@@ -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 | |
@@ -10,21 +10,21 @@ |
||
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | $spurs_includes = array( |
| 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 | - '/hooks.php', // Custom hooks. |
|
| 21 | - '/extras.php', // Custom functions that act independently of the theme templates. |
|
| 22 | - '/customizer.php', // Customizer additions. |
|
| 23 | - '/custom-comments.php', // Custom comments. |
|
| 24 | - '/jetpack.php', // Jetpack compatibility. |
|
| 25 | - '/bootstrap-wp-navwalker.php', // custom WordPress nav walker. |
|
| 26 | - '/woocommerce.php', // WooCommerce functions. |
|
| 27 | - '/editor.php', // Editor functions. |
|
| 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 | + '/hooks.php', // Custom hooks. |
|
| 21 | + '/extras.php', // Custom functions that act independently of the theme templates. |
|
| 22 | + '/customizer.php', // Customizer additions. |
|
| 23 | + '/custom-comments.php', // Custom comments. |
|
| 24 | + '/jetpack.php', // Jetpack compatibility. |
|
| 25 | + '/bootstrap-wp-navwalker.php', // custom WordPress nav walker. |
|
| 26 | + '/woocommerce.php', // WooCommerce functions. |
|
| 27 | + '/editor.php', // Editor functions. |
|
| 28 | 28 | ); |
| 29 | 29 | |
| 30 | 30 | foreach ( $spurs_includes as $file ) { |
@@ -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 | |