@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | <?php lsx_content_wrap_before(); ?> |
11 | 11 | |
12 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
12 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
13 | 13 | |
14 | 14 | <?php lsx_content_before(); ?> |
15 | 15 | |
@@ -17,14 +17,14 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php lsx_content_top(); ?> |
19 | 19 | |
20 | - <?php if ( have_posts() ) : ?> |
|
20 | + <?php if (have_posts()) : ?> |
|
21 | 21 | |
22 | 22 | <?php |
23 | - while ( have_posts() ) : |
|
23 | + while (have_posts()) : |
|
24 | 24 | the_post(); |
25 | 25 | ?> |
26 | 26 | |
27 | - <?php get_template_part( 'partials/content', 'page' ); ?> |
|
27 | + <?php get_template_part('partials/content', 'page'); ?> |
|
28 | 28 | |
29 | 29 | <?php endwhile; ?> |
30 | 30 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | <?php lsx_content_after(); ?> |
38 | 38 | |
39 | 39 | <?php |
40 | - if ( comments_open() ) { |
|
40 | + if (comments_open()) { |
|
41 | 41 | comments_template(); |
42 | 42 | } |
43 | 43 | ?> |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @package lsx |
6 | 6 | */ |
7 | 7 | |
8 | -if ( ! function_exists( 'theme_support' ) ) : |
|
8 | +if ( ! function_exists('theme_support')) : |
|
9 | 9 | /** |
10 | 10 | * Enqueue theme CSS and JavaScript . |
11 | 11 | * |
@@ -13,53 +13,53 @@ discard block |
||
13 | 13 | */ |
14 | 14 | function theme_support() { |
15 | 15 | // Add support for full and wide align images. |
16 | - add_theme_support( 'align-wide' ); |
|
16 | + add_theme_support('align-wide'); |
|
17 | 17 | // Add support for styling blocks. |
18 | - add_theme_support( 'wp-block-styles' ); |
|
18 | + add_theme_support('wp-block-styles'); |
|
19 | 19 | // Add support for custom color scheme. |
20 | - add_theme_support( 'editor-color-palette', array( |
|
20 | + add_theme_support('editor-color-palette', array( |
|
21 | 21 | array( |
22 | - 'name' => __( 'Strong Blue', 'lsx' ), |
|
22 | + 'name' => __('Strong Blue', 'lsx'), |
|
23 | 23 | 'slug' => 'strong-blue', |
24 | 24 | 'color' => '#27639e', |
25 | 25 | ), |
26 | 26 | array( |
27 | - 'name' => __( 'Lighter Blue', 'lsx' ), |
|
27 | + 'name' => __('Lighter Blue', 'lsx'), |
|
28 | 28 | 'slug' => 'lighter-blue', |
29 | 29 | 'color' => '#428bca', |
30 | 30 | ), |
31 | 31 | array( |
32 | - 'name' => __( 'Yellow', 'lsx' ), |
|
32 | + 'name' => __('Yellow', 'lsx'), |
|
33 | 33 | 'slug' => 'light-yellow', |
34 | 34 | 'color' => '#f7ae00', |
35 | 35 | ), |
36 | 36 | array( |
37 | - 'name' => __( 'Dark Yellow', 'lsx' ), |
|
37 | + 'name' => __('Dark Yellow', 'lsx'), |
|
38 | 38 | 'slug' => 'dark-yellow', |
39 | 39 | 'color' => '#ab7800', |
40 | 40 | ), |
41 | 41 | array( |
42 | - 'name' => __( 'Green', 'lsx' ), |
|
42 | + 'name' => __('Green', 'lsx'), |
|
43 | 43 | 'slug' => 'light-green', |
44 | 44 | 'color' => '#6BA913', |
45 | 45 | ), |
46 | 46 | array( |
47 | - 'name' => __( 'Dark Green', 'lsx' ), |
|
47 | + 'name' => __('Dark Green', 'lsx'), |
|
48 | 48 | 'slug' => 'dark-green', |
49 | 49 | 'color' => '#3F640B', |
50 | 50 | ), |
51 | 51 | array( |
52 | - 'name' => __( 'White', 'lsx' ), |
|
52 | + 'name' => __('White', 'lsx'), |
|
53 | 53 | 'slug' => 'white', |
54 | 54 | 'color' => '#ffffff', |
55 | 55 | ), |
56 | 56 | array( |
57 | - 'name' => __( 'Black', 'lsx' ), |
|
57 | + 'name' => __('Black', 'lsx'), |
|
58 | 58 | 'slug' => 'black', |
59 | 59 | 'color' => '#000000', |
60 | 60 | ), |
61 | - ) ); |
|
61 | + )); |
|
62 | 62 | } |
63 | 63 | endif; |
64 | -add_action( 'after_setup_theme', 'theme_support' ); |
|
64 | +add_action('after_setup_theme', 'theme_support'); |
|
65 | 65 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | <?php lsx_content_wrap_before(); ?> |
11 | 11 | |
12 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
12 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
13 | 13 | |
14 | 14 | <?php lsx_content_before(); ?> |
15 | 15 | |
@@ -17,16 +17,16 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php lsx_content_top(); ?> |
19 | 19 | |
20 | - <?php if ( have_posts() ) : ?> |
|
20 | + <?php if (have_posts()) : ?> |
|
21 | 21 | |
22 | 22 | <div class="post-wrapper"> |
23 | 23 | |
24 | 24 | <?php |
25 | - while ( have_posts() ) : |
|
25 | + while (have_posts()) : |
|
26 | 26 | the_post(); |
27 | 27 | ?> |
28 | 28 | |
29 | - <?php get_template_part( 'partials/content', get_post_format() ); ?> |
|
29 | + <?php get_template_part('partials/content', get_post_format()); ?> |
|
30 | 30 | |
31 | 31 | <?php endwhile; ?> |
32 | 32 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | <?php else : ?> |
38 | 38 | |
39 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
39 | + <?php get_template_part('partials/content', 'none'); ?> |
|
40 | 40 | |
41 | 41 | <?php endif; ?> |
42 | 42 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | <?php lsx_content_wrap_after(); ?> |
52 | 52 | |
53 | -<?php get_sidebar( 'sidebar' ); ?> |
|
53 | +<?php get_sidebar('sidebar'); ?> |
|
54 | 54 | |
55 | 55 | <?php |
56 | 56 | get_footer(); |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( ( have_posts() && ! class_exists( 'LSX_Banners' ) || ( function_exists( 'has_blocks' ) && has_blocks() ) ) ) : ?> |
|
23 | + <?php if ((have_posts() && ! class_exists('LSX_Banners') || (function_exists('has_blocks') && has_blocks()))) : ?> |
|
24 | 24 | |
25 | 25 | <?php |
26 | - while ( have_posts() ) : |
|
26 | + while (have_posts()) : |
|
27 | 27 | the_post(); |
28 | 28 | ?> |
29 | 29 | |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | <?php the_content(); ?> |
36 | 36 | |
37 | 37 | <?php |
38 | - wp_link_pages( array( |
|
39 | - 'before' => '<nav class="page-nav"><p>' . esc_html__( 'Pages:', 'lsx' ), |
|
38 | + wp_link_pages(array( |
|
39 | + 'before' => '<nav class="page-nav"><p>' . esc_html__('Pages:', 'lsx'), |
|
40 | 40 | 'after' => '</p></nav>', |
41 | - ) ); |
|
41 | + )); |
|
42 | 42 | ?> |
43 | 43 | </div><!-- .entry-content --> |
44 | 44 | |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | |
51 | 51 | <?php endif; ?> |
52 | 52 | |
53 | - <?php if ( is_active_sidebar( 'sidebar-home' ) ) : ?> |
|
53 | + <?php if (is_active_sidebar('sidebar-home')) : ?> |
|
54 | 54 | |
55 | 55 | <div id="home-widgets"> |
56 | 56 | |
57 | - <?php dynamic_sidebar( 'sidebar-home' ); ?> |
|
57 | + <?php dynamic_sidebar('sidebar-home'); ?> |
|
58 | 58 | |
59 | 59 | </div> |
60 | 60 |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( have_posts() ) : ?> |
|
23 | + <?php if (have_posts()) : ?> |
|
24 | 24 | |
25 | 25 | <?php |
26 | - while ( have_posts() ) : |
|
26 | + while (have_posts()) : |
|
27 | 27 | the_post(); |
28 | 28 | ?> |
29 | 29 | |
30 | - <?php get_template_part( 'partials/content', 'page' ); ?> |
|
30 | + <?php get_template_part('partials/content', 'page'); ?> |
|
31 | 31 | |
32 | 32 | <?php endwhile; ?> |
33 | 33 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | <?php lsx_content_bottom(); ?> |
37 | 37 | |
38 | 38 | <?php |
39 | - if ( comments_open() ) { |
|
39 | + if (comments_open()) { |
|
40 | 40 | comments_template(); |
41 | 41 | } |
42 | 42 | ?> |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | <?php lsx_content_wrap_before(); ?> |
14 | 14 | |
15 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
15 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
16 | 16 | |
17 | 17 | <?php lsx_content_before(); ?> |
18 | 18 | |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( have_posts() ) : ?> |
|
23 | + <?php if (have_posts()) : ?> |
|
24 | 24 | |
25 | 25 | <?php |
26 | - while ( have_posts() ) : |
|
26 | + while (have_posts()) : |
|
27 | 27 | the_post(); |
28 | 28 | ?> |
29 | 29 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | <?php lsx_content_wrap_after(); ?> |
59 | 59 | |
60 | -<?php get_sidebar( 'sitemap' ); ?> |
|
60 | +<?php get_sidebar('sitemap'); ?> |
|
61 | 61 | |
62 | 62 | <?php |
63 | 63 | get_footer(); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | <?php lsx_content_wrap_before(); ?> |
14 | 14 | |
15 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
15 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
16 | 16 | |
17 | 17 | <?php lsx_content_before(); ?> |
18 | 18 | |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( have_posts() ) : ?> |
|
23 | + <?php if (have_posts()) : ?> |
|
24 | 24 | |
25 | 25 | <?php |
26 | - while ( have_posts() ) : |
|
26 | + while (have_posts()) : |
|
27 | 27 | the_post(); |
28 | 28 | ?> |
29 | 29 | |
@@ -34,25 +34,25 @@ discard block |
||
34 | 34 | <?php lsx_entry_top(); ?> |
35 | 35 | |
36 | 36 | <div class="entry-content"> |
37 | - <h2><?php esc_html_e( 'The Last 30 Posts', 'lsx' ); ?></h2> |
|
37 | + <h2><?php esc_html_e('The Last 30 Posts', 'lsx'); ?></h2> |
|
38 | 38 | |
39 | 39 | <ul> |
40 | 40 | <?php |
41 | - $loop = new WP_Query( array( |
|
41 | + $loop = new WP_Query(array( |
|
42 | 42 | 'posts_per_page' => 30, |
43 | - ) ); |
|
43 | + )); |
|
44 | 44 | ?> |
45 | 45 | |
46 | - <?php if ( $loop->have_posts() ) : ?> |
|
46 | + <?php if ($loop->have_posts()) : ?> |
|
47 | 47 | |
48 | - <?php while ( $loop->have_posts() ) : ?> |
|
48 | + <?php while ($loop->have_posts()) : ?> |
|
49 | 49 | |
50 | 50 | <?php |
51 | 51 | $loop->the_post(); |
52 | 52 | $loop->is_home = false; |
53 | 53 | ?> |
54 | 54 | |
55 | - <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time( get_option( 'date_format' ) ); ?> - <?php echo esc_html( $post->comment_count ); ?> <?php esc_html_e( 'comments', 'lsx' ); ?></li> |
|
55 | + <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time(get_option('date_format')); ?> - <?php echo esc_html($post->comment_count); ?> <?php esc_html_e('comments', 'lsx'); ?></li> |
|
56 | 56 | |
57 | 57 | <?php endwhile; ?> |
58 | 58 | |
@@ -61,16 +61,16 @@ discard block |
||
61 | 61 | <?php wp_reset_postdata(); ?> |
62 | 62 | </ul> |
63 | 63 | |
64 | - <h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h2> |
|
64 | + <h2><?php esc_html_e('Categories', 'lsx'); ?></h2> |
|
65 | 65 | |
66 | 66 | <ul> |
67 | - <?php wp_list_categories( 'title_li=&hierarchical=0&show_count=1' ); ?> |
|
67 | + <?php wp_list_categories('title_li=&hierarchical=0&show_count=1'); ?> |
|
68 | 68 | </ul> |
69 | 69 | |
70 | - <h2><?php esc_html_e( 'Monthly Archives', 'lsx' ); ?></h2> |
|
70 | + <h2><?php esc_html_e('Monthly Archives', 'lsx'); ?></h2> |
|
71 | 71 | |
72 | 72 | <ul> |
73 | - <?php wp_get_archives( 'type=monthly&show_post_count=1' ); ?> |
|
73 | + <?php wp_get_archives('type=monthly&show_post_count=1'); ?> |
|
74 | 74 | </ul> |
75 | 75 | </div><!-- .entry-content --> |
76 | 76 |
@@ -22,74 +22,74 @@ discard block |
||
22 | 22 | <ul class="lsx-wc-checkout-steps-items"> |
23 | 23 | <li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done"> |
24 | 24 | <i class="fa fa-check-circle" aria-hidden="true"></i> |
25 | - <span><span><?php esc_html_e( 'Choose your product', 'lsx' ); ?></span></span> |
|
25 | + <span><span><?php esc_html_e('Choose your product', 'lsx'); ?></span></span> |
|
26 | 26 | <i class="fa fa-angle-right" aria-hidden="true"></i> |
27 | 27 | </li> |
28 | 28 | |
29 | 29 | <li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-cart"> |
30 | 30 | <i class="fa fa-check-circle" aria-hidden="true"></i> |
31 | - <span><span><?php esc_html_e( 'My Cart', 'lsx' ); ?></span></span> |
|
31 | + <span><span><?php esc_html_e('My Cart', 'lsx'); ?></span></span> |
|
32 | 32 | </li> |
33 | 33 | |
34 | 34 | <li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-payment"> |
35 | 35 | <i class="fa fa-check-circle" aria-hidden="true"></i> |
36 | - <span><span><?php esc_html_e( 'Payment details', 'lsx' ); ?></span></span> |
|
36 | + <span><span><?php esc_html_e('Payment details', 'lsx'); ?></span></span> |
|
37 | 37 | <i class="fa fa-angle-right" aria-hidden="true"></i> |
38 | 38 | </li> |
39 | 39 | |
40 | 40 | <li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-current lsx-wc-checkout-steps-item-thankyou"> |
41 | - <i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '4', 'lsx' ); ?></i> |
|
42 | - <span><span><?php esc_html_e( 'Thank you!', 'lsx' ); ?></span></span> |
|
41 | + <i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('4', 'lsx'); ?></i> |
|
42 | + <span><span><?php esc_html_e('Thank you!', 'lsx'); ?></span></span> |
|
43 | 43 | </li> |
44 | 44 | </ul> |
45 | 45 | </div> |
46 | 46 | |
47 | 47 | <?php lsx_content_top(); ?> |
48 | 48 | |
49 | - <?php if ( have_posts() ) : ?> |
|
49 | + <?php if (have_posts()) : ?> |
|
50 | 50 | |
51 | 51 | <?php |
52 | - while ( have_posts() ) : |
|
52 | + while (have_posts()) : |
|
53 | 53 | the_post(); |
54 | 54 | ?> |
55 | 55 | |
56 | 56 | <?php |
57 | 57 | WC()->payment_gateways()->payment_gateways; |
58 | - $order_key = isset( $_GET['key'] ) ? wc_clean( $_GET['key'] ) : ''; |
|
59 | - $order_id = absint( $wp->query_vars['order-received'] ); |
|
60 | - $order = wc_get_order( $order_id ); |
|
58 | + $order_key = isset($_GET['key']) ? wc_clean($_GET['key']) : ''; |
|
59 | + $order_id = absint($wp->query_vars['order-received']); |
|
60 | + $order = wc_get_order($order_id); |
|
61 | 61 | ?> |
62 | 62 | |
63 | - <?php if ( $order && $order->get_id() === $order_id && $order->get_order_key() === $order_key ) : ?> |
|
63 | + <?php if ($order && $order->get_id() === $order_id && $order->get_order_key() === $order_key) : ?> |
|
64 | 64 | |
65 | 65 | <?php // @codingStandardsIgnoreStart ?> |
66 | 66 | |
67 | - <div class="alert alert-success"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'lsx' ), $order ); ?></div> |
|
67 | + <div class="alert alert-success"><?php echo apply_filters('woocommerce_thankyou_order_received_text', esc_html__('Thank you. Your order has been received.', 'lsx'), $order); ?></div> |
|
68 | 68 | |
69 | 69 | <div class="row"> |
70 | 70 | <div class="col-xs-12 col-sm-6"> |
71 | - <h2><?php esc_html_e( 'Order Details', 'lsx' ); ?></h2> |
|
71 | + <h2><?php esc_html_e('Order Details', 'lsx'); ?></h2> |
|
72 | 72 | |
73 | 73 | <table class="table"> |
74 | 74 | <tbody> |
75 | 75 | <tr> |
76 | - <th><?php esc_html_e( 'Order:', 'lsx' ); ?></th> |
|
76 | + <th><?php esc_html_e('Order:', 'lsx'); ?></th> |
|
77 | 77 | <td><?php echo $order->get_order_number(); ?></td> |
78 | 78 | </tr> |
79 | 79 | |
80 | 80 | <tr> |
81 | - <th><?php esc_html_e( 'Date:', 'lsx' ); ?></th> |
|
82 | - <td><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></td> |
|
81 | + <th><?php esc_html_e('Date:', 'lsx'); ?></th> |
|
82 | + <td><?php echo date_i18n(get_option('date_format'), strtotime($order->order_date)); ?></td> |
|
83 | 83 | </tr> |
84 | 84 | |
85 | 85 | <tr> |
86 | - <th><?php esc_html_e( 'Total:', 'lsx' ); ?></th> |
|
86 | + <th><?php esc_html_e('Total:', 'lsx'); ?></th> |
|
87 | 87 | <td><?php echo $order->get_formatted_order_total(); ?></td> |
88 | 88 | </tr> |
89 | 89 | |
90 | - <?php if ( $order->payment_method_title ) : ?> |
|
90 | + <?php if ($order->payment_method_title) : ?> |
|
91 | 91 | <tr> |
92 | - <th><?php esc_html_e( 'Payment method:', 'lsx' ); ?></th> |
|
92 | + <th><?php esc_html_e('Payment method:', 'lsx'); ?></th> |
|
93 | 93 | <td><?php echo $order->payment_method_title; ?></td> |
94 | 94 | </tr> |
95 | 95 | <?php endif; ?> |
@@ -98,48 +98,48 @@ discard block |
||
98 | 98 | |
99 | 99 | <?php // do_action( 'woocommerce_order_details_after_order_table', $order ); ?> |
100 | 100 | |
101 | - <h2><?php esc_html_e( 'Customer details', 'lsx' ); ?></h2> |
|
101 | + <h2><?php esc_html_e('Customer details', 'lsx'); ?></h2> |
|
102 | 102 | |
103 | 103 | <dl class="customer_details"> |
104 | 104 | <?php |
105 | - if ( $order->billing_email ) echo '<dt>' . esc_html__( 'Email:', 'lsx' ) . '</dt><dd>' . $order->billing_email . '</dd>'; |
|
106 | - if ( $order->billing_phone ) echo '<dt>' . esc_html__( 'Telephone:', 'lsx' ) . '</dt><dd>' . $order->billing_phone . '</dd>'; |
|
105 | + if ($order->billing_email) echo '<dt>' . esc_html__('Email:', 'lsx') . '</dt><dd>' . $order->billing_email . '</dd>'; |
|
106 | + if ($order->billing_phone) echo '<dt>' . esc_html__('Telephone:', 'lsx') . '</dt><dd>' . $order->billing_phone . '</dd>'; |
|
107 | 107 | |
108 | 108 | // Additional customer details hook |
109 | - do_action( 'woocommerce_order_details_after_customer_details', $order ); |
|
109 | + do_action('woocommerce_order_details_after_customer_details', $order); |
|
110 | 110 | ?> |
111 | 111 | </dl> |
112 | 112 | |
113 | - <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && get_option( 'woocommerce_calc_shipping' ) !== 'no' ) : ?> |
|
113 | + <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && get_option('woocommerce_calc_shipping') !== 'no') : ?> |
|
114 | 114 | |
115 | 115 | <div class="row"> |
116 | 116 | <div class="col-xs-12 col-sm-6"> |
117 | 117 | |
118 | 118 | <?php endif; ?> |
119 | 119 | |
120 | - <h3><?php esc_html_e( 'Billing Address', 'lsx' ); ?></h3> |
|
120 | + <h3><?php esc_html_e('Billing Address', 'lsx'); ?></h3> |
|
121 | 121 | |
122 | 122 | <address> |
123 | 123 | <?php |
124 | - if ( ! $order->get_formatted_billing_address() ) { |
|
125 | - esc_html_e( 'N/A', 'lsx' ); |
|
124 | + if ( ! $order->get_formatted_billing_address()) { |
|
125 | + esc_html_e('N/A', 'lsx'); |
|
126 | 126 | } else { |
127 | 127 | echo $order->get_formatted_billing_address(); |
128 | 128 | } |
129 | 129 | ?> |
130 | 130 | </address> |
131 | 131 | |
132 | - <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && get_option( 'woocommerce_calc_shipping' ) !== 'no' ) : ?> |
|
132 | + <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && get_option('woocommerce_calc_shipping') !== 'no') : ?> |
|
133 | 133 | |
134 | 134 | </div> |
135 | 135 | |
136 | 136 | <div class="col-xs-12 col-sm-6"> |
137 | - <h3><?php esc_html_e( 'Shipping Address', 'lsx' ); ?></h3> |
|
137 | + <h3><?php esc_html_e('Shipping Address', 'lsx'); ?></h3> |
|
138 | 138 | |
139 | 139 | <address> |
140 | 140 | <?php |
141 | - if ( ! $order->get_formatted_shipping_address() ) { |
|
142 | - esc_html_e( 'N/A', 'lsx' ); |
|
141 | + if ( ! $order->get_formatted_shipping_address()) { |
|
142 | + esc_html_e('N/A', 'lsx'); |
|
143 | 143 | } else { |
144 | 144 | echo $order->get_formatted_shipping_address(); |
145 | 145 | } |
@@ -152,68 +152,68 @@ discard block |
||
152 | 152 | </div> |
153 | 153 | |
154 | 154 | <div class="col-xs-12 col-sm-6"> |
155 | - <h2><?php esc_html_e( 'Products details', 'lsx' ); ?></h2> |
|
155 | + <h2><?php esc_html_e('Products details', 'lsx'); ?></h2> |
|
156 | 156 | |
157 | 157 | <table class="table"> |
158 | 158 | <thead> |
159 | 159 | <tr> |
160 | - <th><?php esc_html_e( 'Product', 'lsx' ); ?></th> |
|
161 | - <th><?php esc_html_e( 'Total', 'lsx' ); ?></th> |
|
160 | + <th><?php esc_html_e('Product', 'lsx'); ?></th> |
|
161 | + <th><?php esc_html_e('Total', 'lsx'); ?></th> |
|
162 | 162 | </tr> |
163 | 163 | </thead> |
164 | 164 | |
165 | 165 | <tbody> |
166 | 166 | <?php |
167 | - if ( sizeof( $order->get_items() ) > 0 ) : |
|
168 | - foreach( $order->get_items() as $item ) : |
|
169 | - $_product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item ); |
|
170 | - $item_meta = new WC_Order_Item_Meta( $item['item_meta'], $_product ); |
|
167 | + if (sizeof($order->get_items()) > 0) : |
|
168 | + foreach ($order->get_items() as $item) : |
|
169 | + $_product = apply_filters('woocommerce_order_item_product', $order->get_product_from_item($item), $item); |
|
170 | + $item_meta = new WC_Order_Item_Meta($item['item_meta'], $_product); |
|
171 | 171 | ?> |
172 | 172 | |
173 | 173 | <tr> |
174 | 174 | <td> |
175 | 175 | <?php |
176 | - if ( $_product && ! $_product->is_visible() ) { |
|
177 | - echo apply_filters( 'woocommerce_order_item_name', $item['name'], $item ); |
|
176 | + if ($_product && ! $_product->is_visible()) { |
|
177 | + echo apply_filters('woocommerce_order_item_name', $item['name'], $item); |
|
178 | 178 | } else { |
179 | - echo apply_filters( 'woocommerce_order_item_name', sprintf( '<a href="%s">%s</a>', get_permalink( $item['product_id'] ), $item['name'] ), $item ); |
|
179 | + echo apply_filters('woocommerce_order_item_name', sprintf('<a href="%s">%s</a>', get_permalink($item['product_id']), $item['name']), $item); |
|
180 | 180 | } |
181 | 181 | |
182 | - echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '× %s', $item['qty'] ) . '</strong>', $item ); |
|
182 | + echo apply_filters('woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf('× %s', $item['qty']) . '</strong>', $item); |
|
183 | 183 | |
184 | 184 | ob_start(); |
185 | 185 | $item_meta->display(); |
186 | 186 | $_item_meta = ob_get_clean(); |
187 | 187 | |
188 | - if ( ! empty( $_item_meta ) ) { |
|
188 | + if ( ! empty($_item_meta)) { |
|
189 | 189 | echo $_item_meta; |
190 | 190 | } else { |
191 | 191 | echo '<br>'; |
192 | 192 | } |
193 | 193 | |
194 | - if ( $_product && $_product->exists() && $_product->is_downloadable() && $order->is_download_permitted() ) { |
|
195 | - $download_files = $order->get_item_downloads( $item ); |
|
194 | + if ($_product && $_product->exists() && $_product->is_downloadable() && $order->is_download_permitted()) { |
|
195 | + $download_files = $order->get_item_downloads($item); |
|
196 | 196 | $i = 0; |
197 | 197 | $links = array(); |
198 | 198 | |
199 | - if ( empty( $download_files ) ) { |
|
199 | + if (empty($download_files)) { |
|
200 | 200 | $download_files = $_product->get_files(); |
201 | 201 | } |
202 | 202 | |
203 | - foreach ( $download_files as $download_id => $file ) { |
|
203 | + foreach ($download_files as $download_id => $file) { |
|
204 | 204 | ++$i; |
205 | 205 | |
206 | - if ( $i > 1 ) { |
|
206 | + if ($i > 1) { |
|
207 | 207 | echo '<br>'; |
208 | 208 | } |
209 | 209 | |
210 | - if ( ! empty( $_item_meta ) ) { |
|
210 | + if ( ! empty($_item_meta)) { |
|
211 | 211 | echo '<span style="margin-top: -2.4rem; display: block;">'; |
212 | 212 | } else { |
213 | 213 | echo '<span>'; |
214 | 214 | } |
215 | 215 | |
216 | - echo '<a href="' . esc_url( $file['download_url'] ? $file['download_url'] : $file['file'] ) . '">' . sprintf( esc_html__( 'Download file%s', 'lsx' ), ( count( $download_files ) > 1 ? ' ' . $i . ': ' : ': ' ) ) . esc_html( $file['name'] ) . '</a>'; |
|
216 | + echo '<a href="' . esc_url($file['download_url'] ? $file['download_url'] : $file['file']) . '">' . sprintf(esc_html__('Download file%s', 'lsx'), (count($download_files) > 1 ? ' ' . $i . ': ' : ': ')) . esc_html($file['name']) . '</a>'; |
|
217 | 217 | echo '</span>'; |
218 | 218 | } |
219 | 219 | } |
@@ -221,15 +221,15 @@ discard block |
||
221 | 221 | </td> |
222 | 222 | |
223 | 223 | <td> |
224 | - <?php echo $order->get_formatted_line_subtotal( $item ); ?> |
|
224 | + <?php echo $order->get_formatted_line_subtotal($item); ?> |
|
225 | 225 | </td> |
226 | 226 | </tr> |
227 | 227 | |
228 | 228 | <?php |
229 | - if ( $order->has_status( array( 'completed', 'processing' ) ) && ( $purchase_note = get_post_meta( $_product->id, '_purchase_note', true ) ) ) { |
|
229 | + if ($order->has_status(array('completed', 'processing')) && ($purchase_note = get_post_meta($_product->id, '_purchase_note', true))) { |
|
230 | 230 | ?> |
231 | 231 | <tr class="product-purchase-note"> |
232 | - <td colspan="3"><?php echo wpautop( do_shortcode( wp_kses_post( $purchase_note ) ) ); ?></td> |
|
232 | + <td colspan="3"><?php echo wpautop(do_shortcode(wp_kses_post($purchase_note))); ?></td> |
|
233 | 233 | </tr> |
234 | 234 | <?php |
235 | 235 | } |
@@ -242,8 +242,8 @@ discard block |
||
242 | 242 | |
243 | 243 | <tfoot> |
244 | 244 | <?php |
245 | - if ( $totals = $order->get_order_item_totals() ) : |
|
246 | - foreach ( $totals as $total ) : |
|
245 | + if ($totals = $order->get_order_item_totals()) : |
|
246 | + foreach ($totals as $total) : |
|
247 | 247 | ?> |
248 | 248 | <tr> |
249 | 249 | <th scope="row"><?php echo $total['label']; ?></th> |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | </tfoot> |
257 | 257 | </table> |
258 | 258 | |
259 | - <?php if ( 'bacs' === $order->get_payment_method() ) { ?> |
|
260 | - <h2><?php esc_html_e( 'Bank Details', 'lsx' ); ?></h2> |
|
261 | - <?php do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() ); ?> |
|
259 | + <?php if ('bacs' === $order->get_payment_method()) { ?> |
|
260 | + <h2><?php esc_html_e('Bank Details', 'lsx'); ?></h2> |
|
261 | + <?php do_action('woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id()); ?> |
|
262 | 262 | <?php } ?> |
263 | 263 | </div> |
264 | 264 | </div> |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | |
268 | 268 | <?php else : ?> |
269 | 269 | |
270 | - <div class="alert alert-danger"><?php esc_html_e( 'Invalid order.', 'lsx' ); ?></div> |
|
270 | + <div class="alert alert-danger"><?php esc_html_e('Invalid order.', 'lsx'); ?></div> |
|
271 | 271 | |
272 | 272 | <?php endif; ?> |
273 | 273 |
@@ -7,11 +7,11 @@ discard block |
||
7 | 7 | * @category bootstrap-navigation-walker |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
10 | +if ( ! defined('ABSPATH')) { |
|
11 | 11 | exit; |
12 | 12 | } |
13 | 13 | |
14 | -if ( ! function_exists( 'lsx_wpml_nav_language_switcher_fix' ) ) : |
|
14 | +if ( ! function_exists('lsx_wpml_nav_language_switcher_fix')) : |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * Add in our custom classes to the menus. |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | * @subpackage navigation |
21 | 21 | * @category bootstrap-navigation-walker |
22 | 22 | */ |
23 | - function lsx_wpml_nav_language_switcher_fix( $items, $args ) { |
|
24 | - $items = str_replace( 'menu-item-language-current', 'menu-item-language-current dropdown', $items ); |
|
25 | - $items = str_replace( 'submenu-languages', 'submenu-languages dropdown-menu', $items ); |
|
23 | + function lsx_wpml_nav_language_switcher_fix($items, $args) { |
|
24 | + $items = str_replace('menu-item-language-current', 'menu-item-language-current dropdown', $items); |
|
25 | + $items = str_replace('submenu-languages', 'submenu-languages dropdown-menu', $items); |
|
26 | 26 | return $items; |
27 | 27 | } |
28 | 28 | |
29 | 29 | endif; |
30 | 30 | |
31 | -add_filter( 'wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2 ); |
|
31 | +add_filter('wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2); |