@@ -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; ?> |
@@ -62,8 +62,10 @@ |
||
| 62 | 62 | ?> |
| 63 | 63 | </li> |
| 64 | 64 | <?php endwhile; |
| 65 | - else : |
|
| 65 | + else { |
|
| 66 | + : |
|
| 66 | 67 | get_template_part( 'templates/loop/content', 'none' ); |
| 68 | + } |
|
| 67 | 69 | endif; ?> |
| 68 | 70 | <!-- End Loop --> |
| 69 | 71 | </ul> |
@@ -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 | |
@@ -24,6 +24,8 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | get_template_part( 'templates/loop/content', 'search' ); |
| 26 | 26 | endwhile; |
| 27 | -else : |
|
| 27 | +else { |
|
| 28 | + : |
|
| 28 | 29 | get_template_part( 'templates/loop/content', 'none' ); |
| 30 | +} |
|
| 29 | 31 | endif; |
@@ -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 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | if ( is_array( $img ) ) { |
| 190 | - $url = $size ? $img['sizes'][ $size ] : $img['url']; |
|
| 190 | + $url = $size ? $img['sizes'][$size] : $img['url']; |
|
| 191 | 191 | } else { |
| 192 | 192 | $url = $img; |
| 193 | 193 | } |
@@ -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 | } |