@@ -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; |
@@ -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}" ); ?> |
@@ -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 | |
@@ -182,7 +182,8 @@ |
||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | $atts['target'] = ! empty( $item->target ) ? $item->target : ''; |
| 185 | - if ( '_blank' === $item->target && empty( $item->xfn ) ) { // Thanks to LukaszJaro, see https://github.com/understrap/understrap/issues/973 |
|
| 185 | + if ( '_blank' === $item->target && empty( $item->xfn ) ) { |
|
| 186 | +// Thanks to LukaszJaro, see https://github.com/understrap/understrap/issues/973 |
|
| 186 | 187 | $atts['rel'] = 'noopener noreferrer'; |
| 187 | 188 | } else { |
| 188 | 189 | $atts['rel'] = $item->xfn; |
@@ -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 | |
@@ -33,9 +33,12 @@ |
||
| 33 | 33 | <?php |
| 34 | 34 | get_search_form(); |
| 35 | 35 | |
| 36 | - else : ?> |
|
| 36 | + else { |
|
| 37 | + : ?> |
|
| 37 | 38 | |
| 38 | - <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'spurs' ); ?></p> |
|
| 39 | + <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'spurs' ); |
|
| 40 | + } |
|
| 41 | + ?></p> |
|
| 39 | 42 | <?php |
| 40 | 43 | get_search_form(); |
| 41 | 44 | endif; ?> |
@@ -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 ) { |
@@ -43,12 +43,17 @@ |
||
| 43 | 43 | <a rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" |
| 44 | 44 | title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"><?php bloginfo( 'name' ); ?></a> |
| 45 | 45 | </h1> |
| 46 | - <?php else : ?> |
|
| 47 | - <a class="navbar-brand" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" |
|
| 46 | + <?php else { |
|
| 47 | + : ?> |
|
| 48 | + <a class="navbar-brand" rel="home" href="<?php echo esc_url( home_url( '/' ) ); |
|
| 49 | +} |
|
| 50 | +?>" |
|
| 48 | 51 | title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"><?php bloginfo( 'name' ); ?></a> |
| 49 | 52 | <?php endif; |
| 50 | - else : |
|
| 53 | + else { |
|
| 54 | + : |
|
| 51 | 55 | the_custom_logo(); |
| 56 | + } |
|
| 52 | 57 | endif; // end custom logo ?> |
| 53 | 58 | |
| 54 | 59 | <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" |
@@ -70,7 +70,8 @@ discard block |
||
| 70 | 70 | $actions = wc_get_account_orders_actions( $order ); |
| 71 | 71 | |
| 72 | 72 | if ( ! empty( $actions ) ) { |
| 73 | - foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
|
| 73 | + foreach ( $actions as $key => $action ) { |
|
| 74 | +// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited |
|
| 74 | 75 | echo '<a href="' . esc_url( $action['url'] ) . '" class="woocommerce-button button ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>'; |
| 75 | 76 | } |
| 76 | 77 | } |
@@ -104,11 +105,14 @@ discard block |
||
| 104 | 105 | endif; ?> |
| 105 | 106 | |
| 106 | 107 | <?php |
| 107 | - else : ?> |
|
| 108 | + else { |
|
| 109 | + : ?> |
|
| 108 | 110 | <div |
| 109 | 111 | class="woocommerce-message woocommerce-message--info woocommerce-Message woocommerce-Message--info woocommerce-info"> |
| 110 | 112 | <a class="woocommerce-Button button" |
| 111 | - href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>"> |
|
| 113 | + href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); |
|
| 114 | + } |
|
| 115 | + ?>"> |
|
| 112 | 116 | <?php esc_html_e( 'Go to the shop', 'spurs' ); ?> |
| 113 | 117 | </a> |
| 114 | 118 | <?php esc_html_e( 'No order has been made yet.', 'spurs' ); ?> |
@@ -54,8 +54,11 @@ discard block |
||
| 54 | 54 | ?> |
| 55 | 55 | <?php if ( empty( $product_permalink ) ) : ?> |
| 56 | 56 | <?php echo $thumbnail . $product_name; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 57 | - <?php else : ?> |
|
| 58 | - <a href="<?php echo esc_url( $product_permalink ); ?>"> |
|
| 57 | + <?php else { |
|
| 58 | + : ?> |
|
| 59 | + <a href="<?php echo esc_url( $product_permalink ); |
|
| 60 | +} |
|
| 61 | +?>"> |
|
| 59 | 62 | <?php echo $thumbnail . $product_name; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 60 | 63 | </a> |
| 61 | 64 | <?php endif; ?> |
@@ -87,9 +90,12 @@ discard block |
||
| 87 | 90 | |
| 88 | 91 | <?php do_action( 'woocommerce_widget_shopping_cart_after_buttons' ); ?> |
| 89 | 92 | |
| 90 | -<?php else : ?> |
|
| 93 | +<?php else { |
|
| 94 | + : ?> |
|
| 91 | 95 | |
| 92 | - <p class="woocommerce-mini-cart__empty-message"><?php esc_html_e( 'No products in the cart.', 'spurs' ); ?></p> |
|
| 96 | + <p class="woocommerce-mini-cart__empty-message"><?php esc_html_e( 'No products in the cart.', 'spurs' ); |
|
| 97 | +} |
|
| 98 | +?></p> |
|
| 93 | 99 | |
| 94 | 100 | <?php endif; ?> |
| 95 | 101 | |