@@ -6,25 +6,25 @@ discard block |
||
6 | 6 | * @subpackage layout |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
13 | -if ( ! function_exists( 'lsx_layout_selector' ) ) : |
|
13 | +if ( ! function_exists('lsx_layout_selector')) : |
|
14 | 14 | /** |
15 | 15 | * Layout selector. |
16 | 16 | * |
17 | 17 | * @package lsx |
18 | 18 | * @subpackage layout |
19 | 19 | */ |
20 | - function lsx_layout_selector( $class, $area = 'site' ) { |
|
20 | + function lsx_layout_selector($class, $area = 'site') { |
|
21 | 21 | $return_class = ''; |
22 | - $layout = get_theme_mod( 'lsx_layout', '1c' ); |
|
23 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
22 | + $layout = get_theme_mod('lsx_layout', '1c'); |
|
23 | + $layout = apply_filters('lsx_layout', $layout); |
|
24 | 24 | $default_size = 'sm'; |
25 | - $size = apply_filters( 'lsx_bootstrap_column_size', $default_size ); |
|
25 | + $size = apply_filters('lsx_bootstrap_column_size', $default_size); |
|
26 | 26 | |
27 | - switch ( $layout ) { |
|
27 | + switch ($layout) { |
|
28 | 28 | case '1c': |
29 | 29 | $main_class = 'col-' . $size . '-12'; |
30 | 30 | $sidebar_class = 'col-' . $size . '-12'; |
@@ -43,19 +43,19 @@ discard block |
||
43 | 43 | break; |
44 | 44 | } |
45 | 45 | |
46 | - if ( 'main' === $class ) { |
|
47 | - $return_class = apply_filters( 'lsx_layout_selector', $main_class, $class, $layout, $size ); |
|
46 | + if ('main' === $class) { |
|
47 | + $return_class = apply_filters('lsx_layout_selector', $main_class, $class, $layout, $size); |
|
48 | 48 | } |
49 | 49 | |
50 | - if ( 'sidebar' === $class ) { |
|
51 | - $return_class = apply_filters( 'lsx_layout_selector', $sidebar_class, $class, $layout, $size ); |
|
50 | + if ('sidebar' === $class) { |
|
51 | + $return_class = apply_filters('lsx_layout_selector', $sidebar_class, $class, $layout, $size); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return $return_class; |
55 | 55 | } |
56 | 56 | endif; |
57 | 57 | |
58 | -if ( ! function_exists( 'lsx_main_class' ) ) : |
|
58 | +if ( ! function_exists('lsx_main_class')) : |
|
59 | 59 | /** |
60 | 60 | * .main classes. |
61 | 61 | * |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | * @subpackage layout |
64 | 64 | */ |
65 | 65 | function lsx_main_class() { |
66 | - return lsx_layout_selector( 'main' ); |
|
66 | + return lsx_layout_selector('main'); |
|
67 | 67 | } |
68 | 68 | endif; |
69 | 69 | |
70 | -if ( ! function_exists( 'lsx_sidebar_class' ) ) : |
|
70 | +if ( ! function_exists('lsx_sidebar_class')) : |
|
71 | 71 | /** |
72 | 72 | * .sidebar classes. |
73 | 73 | * |
@@ -75,47 +75,47 @@ discard block |
||
75 | 75 | * @subpackage layout |
76 | 76 | */ |
77 | 77 | function lsx_sidebar_class() { |
78 | - return lsx_layout_selector( 'sidebar' ); |
|
78 | + return lsx_layout_selector('sidebar'); |
|
79 | 79 | } |
80 | 80 | endif; |
81 | 81 | |
82 | -if ( ! function_exists( 'lsx_header_classes' ) ) : |
|
82 | +if ( ! function_exists('lsx_header_classes')) : |
|
83 | 83 | /** |
84 | 84 | * Output the classes for the header. |
85 | 85 | * |
86 | 86 | * @package lsx |
87 | 87 | * @subpackage layout |
88 | 88 | */ |
89 | - function lsx_header_classes( $additional = false ) { |
|
89 | + function lsx_header_classes($additional = false) { |
|
90 | 90 | $classes = 'banner navbar navbar-default'; |
91 | 91 | |
92 | - if ( false !== $additional ) { |
|
92 | + if (false !== $additional) { |
|
93 | 93 | $classes .= ' ' . $additional; |
94 | 94 | } |
95 | 95 | |
96 | - echo esc_attr( $classes ); |
|
96 | + echo esc_attr($classes); |
|
97 | 97 | } |
98 | 98 | endif; |
99 | 99 | |
100 | -if ( ! function_exists( 'lsx_top_menu_classes' ) ) : |
|
100 | +if ( ! function_exists('lsx_top_menu_classes')) : |
|
101 | 101 | /** |
102 | 102 | * Output the classes for the top-menu. |
103 | 103 | * |
104 | 104 | * @package lsx |
105 | 105 | * @subpackage layout |
106 | 106 | */ |
107 | - function lsx_top_menu_classes( $additional = false ) { |
|
107 | + function lsx_top_menu_classes($additional = false) { |
|
108 | 108 | $classes = 'top-menu-default'; |
109 | 109 | |
110 | - if ( false !== $additional ) { |
|
110 | + if (false !== $additional) { |
|
111 | 111 | $classes .= ' ' . $additional; |
112 | 112 | } |
113 | 113 | |
114 | - echo esc_attr( $classes ); |
|
114 | + echo esc_attr($classes); |
|
115 | 115 | } |
116 | 116 | endif; |
117 | 117 | |
118 | -if ( ! function_exists( 'lsx_post_wrapper_class' ) ) : |
|
118 | +if ( ! function_exists('lsx_post_wrapper_class')) : |
|
119 | 119 | /** |
120 | 120 | * Output the classes for the top-menu. |
121 | 121 | * |
@@ -123,13 +123,13 @@ discard block |
||
123 | 123 | * @subpackage layout |
124 | 124 | */ |
125 | 125 | function lsx_post_wrapper_class() { |
126 | - return apply_filters( 'lsx_post_wrapper_class', '' ); |
|
126 | + return apply_filters('lsx_post_wrapper_class', ''); |
|
127 | 127 | } |
128 | 128 | endif; |
129 | 129 | |
130 | 130 | |
131 | 131 | |
132 | -if ( ! function_exists( 'lsx_add_footer_sidebar_area' ) ) : |
|
132 | +if ( ! function_exists('lsx_add_footer_sidebar_area')) : |
|
133 | 133 | /** |
134 | 134 | * Output the Footer CTA and/pr Footer Widgets. |
135 | 135 | * |
@@ -137,33 +137,33 @@ discard block |
||
137 | 137 | * @subpackage layout |
138 | 138 | */ |
139 | 139 | function lsx_add_footer_sidebar_area() { |
140 | - if ( is_active_sidebar( 'sidebar-footer-cta' ) ) : ?> |
|
140 | + if (is_active_sidebar('sidebar-footer-cta')) : ?> |
|
141 | 141 | <div id="footer-cta"> |
142 | 142 | <div class="container"> |
143 | 143 | <div class="lsx-full-width"> |
144 | 144 | <div class="lsx-hero-unit"> |
145 | - <?php dynamic_sidebar( 'sidebar-footer-cta' ); ?> |
|
145 | + <?php dynamic_sidebar('sidebar-footer-cta'); ?> |
|
146 | 146 | </div> |
147 | 147 | </div> |
148 | 148 | </div> |
149 | 149 | </div> |
150 | 150 | <?php endif; ?> |
151 | 151 | |
152 | - <?php if ( is_active_sidebar( 'sidebar-footer' ) ) : ?> |
|
152 | + <?php if (is_active_sidebar('sidebar-footer')) : ?> |
|
153 | 153 | <div id="footer-widgets"> |
154 | 154 | <div class="container"> |
155 | 155 | <div class="row"> |
156 | - <?php dynamic_sidebar( 'sidebar-footer' ); ?> |
|
156 | + <?php dynamic_sidebar('sidebar-footer'); ?> |
|
157 | 157 | </div> |
158 | 158 | </div> |
159 | 159 | </div> |
160 | 160 | <?php |
161 | 161 | endif; |
162 | 162 | } |
163 | - add_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' ); |
|
163 | + add_action('lsx_footer_before', 'lsx_add_footer_sidebar_area'); |
|
164 | 164 | endif; |
165 | 165 | |
166 | -if ( ! function_exists( 'lsx_global_header' ) ) : |
|
166 | +if ( ! function_exists('lsx_global_header')) : |
|
167 | 167 | /** |
168 | 168 | * Displays the global header. |
169 | 169 | * |
@@ -171,24 +171,24 @@ discard block |
||
171 | 171 | * @subpackage layout |
172 | 172 | */ |
173 | 173 | function lsx_global_header() { |
174 | - $show_on_front = get_option( 'show_on_front' ); |
|
174 | + $show_on_front = get_option('show_on_front'); |
|
175 | 175 | $queried_object = get_queried_object(); |
176 | 176 | $default_size = 'sm'; |
177 | - $size = apply_filters( 'lsx_bootstrap_column_size', $default_size ); |
|
177 | + $size = apply_filters('lsx_bootstrap_column_size', $default_size); |
|
178 | 178 | |
179 | 179 | // Cart and Checkout won't have banners of any kind. |
180 | - if ( function_exists( 'is_woocommerce' ) && ( is_checkout() || is_cart() ) ) { |
|
180 | + if (function_exists('is_woocommerce') && (is_checkout() || is_cart())) { |
|
181 | 181 | return; |
182 | 182 | } |
183 | 183 | |
184 | 184 | // Product pages have their own banner function 'lsx_page_banner()'. |
185 | - if ( function_exists( 'is_woocommerce' ) && ( is_product() ) ) { |
|
185 | + if (function_exists('is_woocommerce') && (is_product())) { |
|
186 | 186 | return; |
187 | 187 | } |
188 | 188 | |
189 | - if ( is_page() && ( 'page' !== $show_on_front || ! is_front_page() ) ) : |
|
189 | + if (is_page() && ('page' !== $show_on_front || ! is_front_page())) : |
|
190 | 190 | ?> |
191 | - <div class="archive-header-wrapper banner-page col-<?php echo esc_attr( $size ); ?>-12"> |
|
191 | + <div class="archive-header-wrapper banner-page col-<?php echo esc_attr($size); ?>-12"> |
|
192 | 192 | <?php lsx_global_header_inner_bottom(); ?> |
193 | 193 | <header class="archive-header"> |
194 | 194 | <h1 class="archive-title"><?php the_title(); ?></h1> |
@@ -196,26 +196,26 @@ discard block |
||
196 | 196 | |
197 | 197 | </div> |
198 | 198 | <?php |
199 | - elseif ( is_single() && ! is_singular( 'post' ) ) : |
|
199 | + elseif (is_single() && ! is_singular('post')) : |
|
200 | 200 | ?> |
201 | - <div class="archive-header-wrapper banner-single col-<?php echo esc_attr( $size ); ?>-12"> |
|
201 | + <div class="archive-header-wrapper banner-single col-<?php echo esc_attr($size); ?>-12"> |
|
202 | 202 | <?php lsx_global_header_inner_bottom(); ?> |
203 | 203 | <header class="archive-header"> |
204 | - <h1 class="archive-title"><?php echo wp_kses_post( apply_filters( 'lsx_global_header_title', get_the_title() ) ); ?></h1> |
|
204 | + <h1 class="archive-title"><?php echo wp_kses_post(apply_filters('lsx_global_header_title', get_the_title())); ?></h1> |
|
205 | 205 | </header> |
206 | 206 | |
207 | 207 | </div> |
208 | 208 | <?php |
209 | - elseif ( is_search() ) : |
|
209 | + elseif (is_search()) : |
|
210 | 210 | ?> |
211 | - <div class="archive-header-wrapper banner-search col-<?php echo esc_attr( $size ); ?>-12"> |
|
211 | + <div class="archive-header-wrapper banner-search col-<?php echo esc_attr($size); ?>-12"> |
|
212 | 212 | <?php lsx_global_header_inner_bottom(); ?> |
213 | 213 | <header class="archive-header"> |
214 | 214 | <h1 class="archive-title"> |
215 | 215 | <?php |
216 | 216 | printf( |
217 | 217 | /* Translators: %s: search term/query */ |
218 | - esc_html__( 'Search Results for: %s', 'lsx' ), |
|
218 | + esc_html__('Search Results for: %s', 'lsx'), |
|
219 | 219 | '<span>' . get_search_query() . '</span>' |
220 | 220 | ); |
221 | 221 | ?> |
@@ -224,12 +224,12 @@ discard block |
||
224 | 224 | |
225 | 225 | </div> |
226 | 226 | <?php |
227 | - elseif ( is_author() ) : |
|
227 | + elseif (is_author()) : |
|
228 | 228 | $author = get_the_author(); |
229 | - $author_avatar = get_avatar( get_the_author_meta( 'ID' ), 256 ); |
|
229 | + $author_avatar = get_avatar(get_the_author_meta('ID'), 256); |
|
230 | 230 | $author_bio = get_the_archive_description(); |
231 | 231 | ?> |
232 | - <div class="archive-header-wrapper banner-archive-author col-<?php echo esc_attr( $size ); ?>-12"> |
|
232 | + <div class="archive-header-wrapper banner-archive-author col-<?php echo esc_attr($size); ?>-12"> |
|
233 | 233 | <?php lsx_global_header_inner_bottom(); ?> |
234 | 234 | <header class="archive-header"> |
235 | 235 | <h1 class="archive-title"><?php the_archive_title(); ?></h1> |
@@ -237,57 +237,57 @@ discard block |
||
237 | 237 | |
238 | 238 | </div> |
239 | 239 | <?php |
240 | - elseif ( is_archive() ) : |
|
240 | + elseif (is_archive()) : |
|
241 | 241 | ?> |
242 | - <div class="archive-header-wrapper banner-archive col-<?php echo esc_attr( $size ); ?>-12"> |
|
242 | + <div class="archive-header-wrapper banner-archive col-<?php echo esc_attr($size); ?>-12"> |
|
243 | 243 | <?php lsx_global_header_inner_bottom(); ?> |
244 | 244 | <header class="archive-header"> |
245 | 245 | <h1 class="archive-title"> |
246 | - <?php if ( has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax( 'post_format' ) ) { ?> |
|
247 | - <?php the_archive_title( esc_html__( 'Type:', 'lsx' ) ); ?> |
|
246 | + <?php if (has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax('post_format')) { ?> |
|
247 | + <?php the_archive_title(esc_html__('Type:', 'lsx')); ?> |
|
248 | 248 | <?php } else { ?> |
249 | - <?php echo wp_kses_post( apply_filters( 'lsx_global_header_title', get_the_archive_title() ) ); ?> |
|
249 | + <?php echo wp_kses_post(apply_filters('lsx_global_header_title', get_the_archive_title())); ?> |
|
250 | 250 | <?php } ?> |
251 | 251 | </h1> |
252 | 252 | |
253 | 253 | <?php |
254 | - if ( false === apply_filters( 'lsx_display_global_header_description', false ) ) { |
|
254 | + if (false === apply_filters('lsx_display_global_header_description', false)) { |
|
255 | 255 | the_archive_description(); |
256 | 256 | } |
257 | 257 | ?> |
258 | 258 | </header> |
259 | 259 | </div> |
260 | 260 | <?php |
261 | - elseif ( 'page' === $show_on_front && (int) get_option( 'page_for_posts' ) === $queried_object->ID ) : |
|
261 | + elseif ('page' === $show_on_front && (int) get_option('page_for_posts') === $queried_object->ID) : |
|
262 | 262 | ?> |
263 | - <div class="archive-header-wrapper banner-page col-<?php echo esc_attr( $size ); ?>-12"> |
|
263 | + <div class="archive-header-wrapper banner-page col-<?php echo esc_attr($size); ?>-12"> |
|
264 | 264 | <?php lsx_global_header_inner_bottom(); ?> |
265 | 265 | <header class="archive-header"> |
266 | - <h1 class="archive-title"><?php esc_html_e( 'Blog', 'lsx' ); ?></h1> |
|
266 | + <h1 class="archive-title"><?php esc_html_e('Blog', 'lsx'); ?></h1> |
|
267 | 267 | </header> |
268 | 268 | |
269 | 269 | </div> |
270 | 270 | <?php |
271 | - elseif ( ! is_singular( 'post' ) ) : |
|
271 | + elseif ( ! is_singular('post')) : |
|
272 | 272 | // Display only the breadcrumbs. |
273 | 273 | ?> |
274 | - <div class="archive-header-wrapper banner-singular col-<?php echo esc_attr( $size ); ?>-12"> |
|
274 | + <div class="archive-header-wrapper banner-singular col-<?php echo esc_attr($size); ?>-12"> |
|
275 | 275 | <?php lsx_global_header_inner_bottom(); ?> |
276 | 276 | </div> |
277 | 277 | <?php |
278 | - elseif ( ( true === apply_filters( 'lsx_global_header_disable', false ) ) && ( ! is_search() ) ) : |
|
278 | + elseif ((true === apply_filters('lsx_global_header_disable', false)) && ( ! is_search())) : |
|
279 | 279 | // Display only the breadcrumbs. |
280 | 280 | ?> |
281 | - <div class="archive-header-wrapper banner-global col-<?php echo esc_attr( $size ); ?>-12"> |
|
281 | + <div class="archive-header-wrapper banner-global col-<?php echo esc_attr($size); ?>-12"> |
|
282 | 282 | <?php lsx_global_header_inner_bottom(); ?> |
283 | 283 | </div> |
284 | 284 | <?php |
285 | 285 | endif; |
286 | 286 | } |
287 | - add_action( 'lsx_content_wrap_before', 'lsx_global_header' ); |
|
287 | + add_action('lsx_content_wrap_before', 'lsx_global_header'); |
|
288 | 288 | endif; |
289 | 289 | |
290 | -if ( ! function_exists( 'lsx_author_extra_info' ) ) : |
|
290 | +if ( ! function_exists('lsx_author_extra_info')) : |
|
291 | 291 | /** |
292 | 292 | * Displays the author extra info. |
293 | 293 | * |
@@ -296,83 +296,83 @@ discard block |
||
296 | 296 | */ |
297 | 297 | function lsx_author_extra_info() { |
298 | 298 | $default_size = 'sm'; |
299 | - $size = apply_filters( 'lsx_bootstrap_column_size', $default_size ); |
|
299 | + $size = apply_filters('lsx_bootstrap_column_size', $default_size); |
|
300 | 300 | |
301 | - if ( is_author() ) : |
|
302 | - $author_id = get_the_author_meta( 'ID' ); |
|
301 | + if (is_author()) : |
|
302 | + $author_id = get_the_author_meta('ID'); |
|
303 | 303 | $author = get_the_author(); |
304 | - $author_avatar = get_avatar( $author_id, 400 ); |
|
304 | + $author_avatar = get_avatar($author_id, 400); |
|
305 | 305 | $author_bio = get_the_archive_description(); |
306 | - $author_url = get_the_author_meta( 'url', $author_id ); |
|
307 | - $author_email = get_the_author_meta( 'email', $author_id ); |
|
308 | - $author_facebook = get_the_author_meta( 'facebook', $author_id ); |
|
309 | - $author_linkedin = get_the_author_meta( 'linkedin', $author_id ); |
|
310 | - $author_twitter = get_the_author_meta( 'twitter', $author_id ); |
|
311 | - $author_googleplus = get_the_author_meta( 'googleplus', $author_id ); |
|
306 | + $author_url = get_the_author_meta('url', $author_id); |
|
307 | + $author_email = get_the_author_meta('email', $author_id); |
|
308 | + $author_facebook = get_the_author_meta('facebook', $author_id); |
|
309 | + $author_linkedin = get_the_author_meta('linkedin', $author_id); |
|
310 | + $author_twitter = get_the_author_meta('twitter', $author_id); |
|
311 | + $author_googleplus = get_the_author_meta('googleplus', $author_id); |
|
312 | 312 | ?> |
313 | - <div class="col-<?php echo esc_attr( $size ); ?>-12"> |
|
313 | + <div class="col-<?php echo esc_attr($size); ?>-12"> |
|
314 | 314 | <div class="archive-author-data"> |
315 | 315 | <div class="row"> |
316 | - <?php if ( ! empty( $author_avatar ) ) : ?> |
|
316 | + <?php if ( ! empty($author_avatar)) : ?> |
|
317 | 317 | <div class="col-xs-12 col-sm-4 col-md-3"> |
318 | - <figure class="archive-author-avatar"><?php echo wp_kses_post( $author_avatar ); ?></figure> |
|
318 | + <figure class="archive-author-avatar"><?php echo wp_kses_post($author_avatar); ?></figure> |
|
319 | 319 | </div> |
320 | 320 | <?php endif; ?> |
321 | 321 | <div class="col-xs-12 col-sm-8 col-md-9"> |
322 | - <a class="back-to-blog" href="<?php echo ( esc_url( get_post_type_archive_link( 'post' ) ) ); ?>"><?php echo esc_html__( 'Back To Blog', 'lsx' ); ?></a> |
|
322 | + <a class="back-to-blog" href="<?php echo (esc_url(get_post_type_archive_link('post'))); ?>"><?php echo esc_html__('Back To Blog', 'lsx'); ?></a> |
|
323 | 323 | <!-- Name --> |
324 | 324 | <h2 class="archive-author-title"> |
325 | 325 | <?php |
326 | - if ( '' !== $author ) { |
|
327 | - echo esc_html( $author ); |
|
326 | + if ('' !== $author) { |
|
327 | + echo esc_html($author); |
|
328 | 328 | } |
329 | 329 | ?> |
330 | 330 | </h2> |
331 | 331 | <!-- Social --> |
332 | - <?php if ( ! empty( $author_url ) || ! empty( $author_email ) || ! empty( $author_facebook ) || ! empty( $author_twitter ) || ! empty( $author_googleplus ) ) : ?> |
|
332 | + <?php if ( ! empty($author_url) || ! empty($author_email) || ! empty($author_facebook) || ! empty($author_twitter) || ! empty($author_googleplus)) : ?> |
|
333 | 333 | <div class="archive-author-social-links"> |
334 | - <?php if ( ! empty( $author_url ) ) : ?> |
|
335 | - <a href="<?php echo esc_url( $author_url ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-url"><i class="fa fa-link" aria-hidden="true"></i></a> |
|
334 | + <?php if ( ! empty($author_url)) : ?> |
|
335 | + <a href="<?php echo esc_url($author_url); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-url"><i class="fa fa-link" aria-hidden="true"></i></a> |
|
336 | 336 | <?php endif; ?> |
337 | 337 | |
338 | - <?php if ( ! empty( $author_email ) ) : ?> |
|
339 | - <a href="mailto:<?php echo esc_attr( $author_email ); ?>" class="archive-author-social-link archive-author-social-link-email"><i class="fa fa-envelope" aria-hidden="true"></i></a> |
|
338 | + <?php if ( ! empty($author_email)) : ?> |
|
339 | + <a href="mailto:<?php echo esc_attr($author_email); ?>" class="archive-author-social-link archive-author-social-link-email"><i class="fa fa-envelope" aria-hidden="true"></i></a> |
|
340 | 340 | <?php endif; ?> |
341 | 341 | |
342 | - <?php if ( ! empty( $author_facebook ) ) : ?> |
|
343 | - <a href="<?php echo esc_url( $author_facebook ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a> |
|
342 | + <?php if ( ! empty($author_facebook)) : ?> |
|
343 | + <a href="<?php echo esc_url($author_facebook); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a> |
|
344 | 344 | <?php endif; ?> |
345 | 345 | |
346 | - <?php if ( ! empty( $author_twitter ) ) : ?> |
|
347 | - <a href="https://twitter.com/<?php echo esc_attr( $author_twitter ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> |
|
346 | + <?php if ( ! empty($author_twitter)) : ?> |
|
347 | + <a href="https://twitter.com/<?php echo esc_attr($author_twitter); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> |
|
348 | 348 | <?php endif; ?> |
349 | 349 | |
350 | - <?php if ( ! empty( $author_linkedin ) ) : ?> |
|
351 | - <a href="<?php echo esc_url( $author_linkedin ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-linkedin"><i class="fa fa-linkedin" aria-hidden="true"></i></a> |
|
350 | + <?php if ( ! empty($author_linkedin)) : ?> |
|
351 | + <a href="<?php echo esc_url($author_linkedin); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-linkedin"><i class="fa fa-linkedin" aria-hidden="true"></i></a> |
|
352 | 352 | <?php endif; ?> |
353 | 353 | |
354 | - <?php if ( ! empty( $author_googleplus ) ) : ?> |
|
355 | - <a href="<?php echo esc_url( $author_googleplus ); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-googleplus"><i class="fa fa-google-plus" aria-hidden="true"></i></a> |
|
354 | + <?php if ( ! empty($author_googleplus)) : ?> |
|
355 | + <a href="<?php echo esc_url($author_googleplus); ?>" target="_blank" rel="nofollow noreferrer noopener" class="archive-author-social-link archive-author-social-link-googleplus"><i class="fa fa-google-plus" aria-hidden="true"></i></a> |
|
356 | 356 | <?php endif; ?> |
357 | 357 | </div> |
358 | 358 | <?php endif; ?> |
359 | 359 | |
360 | 360 | <!-- Bio --> |
361 | - <?php if ( ! empty( $author_bio ) ) : ?> |
|
362 | - <p class="archive-author-bio"><?php echo wp_kses_post( $author_bio ); ?></p> |
|
361 | + <?php if ( ! empty($author_bio)) : ?> |
|
362 | + <p class="archive-author-bio"><?php echo wp_kses_post($author_bio); ?></p> |
|
363 | 363 | <?php endif; ?> |
364 | 364 | </div> |
365 | 365 | </div> |
366 | 366 | </div> |
367 | - <h2><?php echo esc_html__( 'Posts', 'lsx' ); ?></h2> |
|
367 | + <h2><?php echo esc_html__('Posts', 'lsx'); ?></h2> |
|
368 | 368 | </div> |
369 | 369 | <?php |
370 | 370 | endif; |
371 | 371 | } |
372 | - add_action( 'lsx_content_wrap_before', 'lsx_author_extra_info', 11 ); |
|
372 | + add_action('lsx_content_wrap_before', 'lsx_author_extra_info', 11); |
|
373 | 373 | endif; |
374 | 374 | |
375 | -if ( ! function_exists( 'lsx_post_header' ) ) : |
|
375 | +if ( ! function_exists('lsx_post_header')) : |
|
376 | 376 | /** |
377 | 377 | * Displays the post header. |
378 | 378 | * |
@@ -381,21 +381,21 @@ discard block |
||
381 | 381 | */ |
382 | 382 | function lsx_post_header() { |
383 | 383 | $default_size = 'sm'; |
384 | - $size = apply_filters( 'lsx_bootstrap_column_size', $default_size ); |
|
384 | + $size = apply_filters('lsx_bootstrap_column_size', $default_size); |
|
385 | 385 | |
386 | - if ( is_singular( 'post' ) ) : |
|
386 | + if (is_singular('post')) : |
|
387 | 387 | $format = get_post_format(); |
388 | 388 | |
389 | - if ( false === $format ) { |
|
389 | + if (false === $format) { |
|
390 | 390 | $format = 'standard'; |
391 | 391 | } |
392 | 392 | |
393 | - $format = lsx_translate_format_to_fontawesome( $format ); |
|
393 | + $format = lsx_translate_format_to_fontawesome($format); |
|
394 | 394 | ?> |
395 | - <div class="archive-header-wrapper banner-post-header col-<?php echo esc_attr( $size ); ?>-12"> |
|
395 | + <div class="archive-header-wrapper banner-post-header col-<?php echo esc_attr($size); ?>-12"> |
|
396 | 396 | <header class="archive-header"> |
397 | 397 | <h1 class="archive-title"> |
398 | - <i class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></i> |
|
398 | + <i class="format-link fa fa-<?php echo esc_attr($format); ?>"></i> |
|
399 | 399 | <span><?php the_title(); ?></span> |
400 | 400 | </h1> |
401 | 401 | </header> |
@@ -403,10 +403,10 @@ discard block |
||
403 | 403 | <?php |
404 | 404 | endif; |
405 | 405 | } |
406 | - add_action( 'lsx_entry_top', 'lsx_post_header' ); |
|
406 | + add_action('lsx_entry_top', 'lsx_post_header'); |
|
407 | 407 | endif; |
408 | 408 | |
409 | -if ( ! function_exists( 'lsx_add_viewport_meta_tag' ) ) : |
|
409 | +if ( ! function_exists('lsx_add_viewport_meta_tag')) : |
|
410 | 410 | /** |
411 | 411 | * Add Viewport Meta Tag to head. |
412 | 412 | * |
@@ -418,10 +418,10 @@ discard block |
||
418 | 418 | <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> |
419 | 419 | <?php |
420 | 420 | } |
421 | - add_action( 'wp_head', 'lsx_add_viewport_meta_tag' ); |
|
421 | + add_action('wp_head', 'lsx_add_viewport_meta_tag'); |
|
422 | 422 | endif; |
423 | 423 | |
424 | -if ( ! function_exists( 'lsx_header_search_form' ) ) : |
|
424 | +if ( ! function_exists('lsx_header_search_form')) : |
|
425 | 425 | /** |
426 | 426 | * Add a search form to just above the nav menu. |
427 | 427 | * |
@@ -429,20 +429,20 @@ discard block |
||
429 | 429 | * @subpackage layout |
430 | 430 | */ |
431 | 431 | function lsx_header_search_form() { |
432 | - $search_form = get_theme_mod( 'lsx_header_search', false ); |
|
432 | + $search_form = get_theme_mod('lsx_header_search', false); |
|
433 | 433 | |
434 | - if ( false !== $search_form || is_customize_preview() ) { |
|
435 | - get_search_form( true ); |
|
434 | + if (false !== $search_form || is_customize_preview()) { |
|
435 | + get_search_form(true); |
|
436 | 436 | } |
437 | 437 | } |
438 | - $mobile_header_layout = get_theme_mod( 'lsx_header_mobile_layout', 'navigation-bar' ); |
|
439 | - add_action( 'lsx_nav_before', 'lsx_header_search_form', 0 ); |
|
438 | + $mobile_header_layout = get_theme_mod('lsx_header_mobile_layout', 'navigation-bar'); |
|
439 | + add_action('lsx_nav_before', 'lsx_header_search_form', 0); |
|
440 | 440 | endif; |
441 | 441 | |
442 | 442 | // Add entry meta to single post if active. |
443 | -if ( ! function_exists( 'lsx_add_entry_meta' ) ) : |
|
443 | +if ( ! function_exists('lsx_add_entry_meta')) : |
|
444 | 444 | function lsx_add_entry_meta() { |
445 | - if ( is_single() && is_singular( 'post' ) ) { |
|
445 | + if (is_single() && is_singular('post')) { |
|
446 | 446 | ?> |
447 | 447 | <div class="entry-meta"> |
448 | 448 | <?php lsx_post_meta_single_top(); ?> |
@@ -450,5 +450,5 @@ discard block |
||
450 | 450 | <?php |
451 | 451 | } |
452 | 452 | } |
453 | - add_action( 'lsx_entry_top', 'lsx_add_entry_meta', 999 ); |
|
453 | + add_action('lsx_entry_top', 'lsx_add_entry_meta', 999); |
|
454 | 454 | endif; |
@@ -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( 'Shop', 'lsx' ); ?></span></span> |
|
25 | + <span><span><?php esc_html_e('Shop', '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( 'Billing details', 'lsx' ); ?></span></span> |
|
36 | + <span><span><?php esc_html_e('Billing 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( 'Payment', '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('Payment', '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 |