Passed
Push — add/6 ( 8d6bdd...1ceb7c )
by Virginia
04:36
created
Category
examples/lsx-customizer-colour.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -5,72 +5,72 @@  discard block
 block discarded – undo
5 5
  *
6 6
  * Add two new colors (test) in main array of colors
7 7
  */
8
-function test_lsx_customizer_colour_names( $array ) {
9
-	$array['test_text_color']       = esc_html__( 'TEST: Text', 'lsx-customizer' );
10
-	$array['test_text_color_hover'] = esc_html__( 'TEST: Text (hover)', 'lsx-customizer' );
8
+function test_lsx_customizer_colour_names($array) {
9
+	$array['test_text_color']       = esc_html__('TEST: Text', 'lsx-customizer');
10
+	$array['test_text_color_hover'] = esc_html__('TEST: Text (hover)', 'lsx-customizer');
11 11
 	return $array;
12 12
 }
13
-add_filter( 'lsx_customizer_colour_names', 'test_lsx_customizer_colour_names' );
13
+add_filter('lsx_customizer_colour_names', 'test_lsx_customizer_colour_names');
14 14
 
15 15
 /**
16 16
  * Filter: lsx_customizer_colour_choices_default
17 17
  *
18 18
  * Add the new colors (test) in default scheme
19 19
  */
20
-function test_lsx_customizer_colour_choices_default( $array ) {
20
+function test_lsx_customizer_colour_choices_default($array) {
21 21
 	$array['test_text_color']       = '#ddddd1';
22 22
 	$array['test_text_color_hover'] = '#eeeee1';
23 23
 	return $array;
24 24
 }
25
-add_filter( 'lsx_customizer_colour_choices_default', 'test_lsx_customizer_colour_choices_default' );
25
+add_filter('lsx_customizer_colour_choices_default', 'test_lsx_customizer_colour_choices_default');
26 26
 
27 27
 /**
28 28
  * Filter: lsx_customizer_colour_choices_red
29 29
  *
30 30
  * Add the new colors (test) in red scheme
31 31
  */
32
-function test_lsx_customizer_colour_choices_red( $array ) {
32
+function test_lsx_customizer_colour_choices_red($array) {
33 33
 	$array['test_text_color']       = '#ddddd2';
34 34
 	$array['test_text_color_hover'] = '#eeeee2';
35 35
 	return $array;
36 36
 }
37
-add_filter( 'lsx_customizer_colour_choices_red', 'test_lsx_customizer_colour_choices_red' );
37
+add_filter('lsx_customizer_colour_choices_red', 'test_lsx_customizer_colour_choices_red');
38 38
 
39 39
 /**
40 40
  * Filter: lsx_customizer_colour_choices_orange
41 41
  *
42 42
  * Add the new colors (test) in orange scheme
43 43
  */
44
-function test_lsx_customizer_colour_choices_orange( $array ) {
44
+function test_lsx_customizer_colour_choices_orange($array) {
45 45
 	$array['test_text_color']       = '#ddddd3';
46 46
 	$array['test_text_color_hover'] = '#eeeee3';
47 47
 	return $array;
48 48
 }
49
-add_filter( 'lsx_customizer_colour_choices_orange', 'test_lsx_customizer_colour_choices_orange' );
49
+add_filter('lsx_customizer_colour_choices_orange', 'test_lsx_customizer_colour_choices_orange');
50 50
 
51 51
 /**
52 52
  * Filter: lsx_customizer_colour_choices_green
53 53
  *
54 54
  * Add the new colors (test) in green scheme
55 55
  */
56
-function test_lsx_customizer_colour_choices_green( $array ) {
56
+function test_lsx_customizer_colour_choices_green($array) {
57 57
 	$array['test_text_color']       = '#ddddd4';
58 58
 	$array['test_text_color_hover'] = '#eeeee4';
59 59
 	return $array;
60 60
 }
61
-add_filter( 'lsx_customizer_colour_choices_green', 'test_lsx_customizer_colour_choices_green' );
61
+add_filter('lsx_customizer_colour_choices_green', 'test_lsx_customizer_colour_choices_green');
62 62
 
63 63
 /**
64 64
  * Filter: lsx_customizer_colour_choices_brown
65 65
  *
66 66
  * Add the new colors (test) in brown scheme
67 67
  */
68
-function test_lsx_customizer_colour_choices_brown( $array ) {
68
+function test_lsx_customizer_colour_choices_brown($array) {
69 69
 	$array['test_text_color']       = '#ddddd5';
70 70
 	$array['test_text_color_hover'] = '#eeeee5';
71 71
 	return $array;
72 72
 }
73
-add_filter( 'lsx_customizer_colour_choices_brown', 'test_lsx_customizer_colour_choices_brown' );
73
+add_filter('lsx_customizer_colour_choices_brown', 'test_lsx_customizer_colour_choices_brown');
74 74
 
75 75
 /**
76 76
  * Filter: lsx_customizer_colour_choices
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
  * Add a new scheme
79 79
  * Also add the new colors (test) in new scheme
80 80
  */
81
-function test_lsx_customizer_colour_choices( $array ) {
81
+function test_lsx_customizer_colour_choices($array) {
82 82
 	$array['test'] = array(
83
-		'label'  => esc_html__( 'Test', 'lsx-customizer' ),
83
+		'label'  => esc_html__('Test', 'lsx-customizer'),
84 84
 		'colors' => array(
85 85
 			'button_background_color'       => '#428bca',
86 86
 			'button_background_hover_color' => '#2a6496',
@@ -162,14 +162,14 @@  discard block
 block discarded – undo
162 162
 
163 163
 	return $array;
164 164
 }
165
-add_filter( 'lsx_customizer_colour_choices', 'test_lsx_customizer_colour_choices' );
165
+add_filter('lsx_customizer_colour_choices', 'test_lsx_customizer_colour_choices');
166 166
 
167 167
 /**
168 168
  * Filter: lsx_customizer_colour_selectors_button
169 169
  *
170 170
  * Add new selectors in "button" group of colours
171 171
  */
172
-function test_lsx_customizer_colour_selectors_button( $css, $colors ) {
172
+function test_lsx_customizer_colour_selectors_button($css, $colors) {
173 173
 	$css .= <<<CSS
174 174
 
175 175
 	/* Button TEST */
@@ -185,14 +185,14 @@  discard block
 block discarded – undo
185 185
 
186 186
 	return $css;
187 187
 }
188
-add_filter( 'lsx_customizer_colour_selectors_button', 'test_lsx_customizer_colour_selectors_button', 10, 2 );
188
+add_filter('lsx_customizer_colour_selectors_button', 'test_lsx_customizer_colour_selectors_button', 10, 2);
189 189
 
190 190
 /**
191 191
  * Filter: lsx_customizer_colour_selectors_button_cta
192 192
  *
193 193
  * Add new selectors in "button cta" group of colours
194 194
  */
195
-function test_lsx_customizer_colour_selectors_button_cta( $css, $colors ) {
195
+function test_lsx_customizer_colour_selectors_button_cta($css, $colors) {
196 196
 	$css .= <<<CSS
197 197
 
198 198
 	/* Button CTA TEST */
@@ -208,14 +208,14 @@  discard block
 block discarded – undo
208 208
 
209 209
 	return $css;
210 210
 }
211
-add_filter( 'lsx_customizer_colour_selectors_button_cta', 'test_lsx_customizer_colour_selectors_button_cta', 10, 2 );
211
+add_filter('lsx_customizer_colour_selectors_button_cta', 'test_lsx_customizer_colour_selectors_button_cta', 10, 2);
212 212
 
213 213
 /**
214 214
  * Filter: lsx_customizer_colour_selectors_top_menu
215 215
  *
216 216
  * Add new selectors in "top menu" group of colours
217 217
  */
218
-function test_lsx_customizer_colour_selectors_top_menu( $css, $colors ) {
218
+function test_lsx_customizer_colour_selectors_top_menu($css, $colors) {
219 219
 	$css .= <<<CSS
220 220
 
221 221
 	/* Top Menu TEST */
@@ -235,14 +235,14 @@  discard block
 block discarded – undo
235 235
 
236 236
 	return $css;
237 237
 }
238
-add_filter( 'lsx_customizer_colour_selectors_top_menu', 'test_lsx_customizer_colour_selectors_top_menu', 10, 2 );
238
+add_filter('lsx_customizer_colour_selectors_top_menu', 'test_lsx_customizer_colour_selectors_top_menu', 10, 2);
239 239
 
240 240
 /**
241 241
  * Filter: lsx_customizer_colour_selectors_header
242 242
  *
243 243
  * Add new selectors in "header" group of colours
244 244
  */
245
-function test_lsx_customizer_colour_selectors_header( $css, $colors ) {
245
+function test_lsx_customizer_colour_selectors_header($css, $colors) {
246 246
 	$css .= <<<CSS
247 247
 
248 248
 	/* Header TEST */
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
 
258 258
 	return $css;
259 259
 }
260
-add_filter( 'lsx_customizer_colour_selectors_header', 'test_lsx_customizer_colour_selectors_header', 10, 2 );
260
+add_filter('lsx_customizer_colour_selectors_header', 'test_lsx_customizer_colour_selectors_header', 10, 2);
261 261
 
262 262
 /**
263 263
  * Filter: lsx_customizer_colour_selectors_main_menu
264 264
  *
265 265
  * Add new selectors in "main meun" group of colours
266 266
  */
267
-function test_lsx_customizer_colour_selectors_main_menu( $css, $colors ) {
267
+function test_lsx_customizer_colour_selectors_main_menu($css, $colors) {
268 268
 	$css .= <<<CSS
269 269
 
270 270
 	/* Main Menu TEST */
@@ -282,14 +282,14 @@  discard block
 block discarded – undo
282 282
 
283 283
 	return $css;
284 284
 }
285
-add_filter( 'lsx_customizer_colour_selectors_main_menu', 'test_lsx_customizer_colour_selectors_main_menu', 10, 2 );
285
+add_filter('lsx_customizer_colour_selectors_main_menu', 'test_lsx_customizer_colour_selectors_main_menu', 10, 2);
286 286
 
287 287
 /**
288 288
  * Filter: lsx_customizer_colour_selectors_banner
289 289
  *
290 290
  * Add new selectors in "banner" group of colours
291 291
  */
292
-function test_lsx_customizer_colour_selectors_banner( $css, $colors ) {
292
+function test_lsx_customizer_colour_selectors_banner($css, $colors) {
293 293
 	$css .= <<<CSS
294 294
 
295 295
 	/* Banner TEST */
@@ -306,14 +306,14 @@  discard block
 block discarded – undo
306 306
 
307 307
 	return $css;
308 308
 }
309
-add_filter( 'lsx_customizer_colour_selectors_banner', 'test_lsx_customizer_colour_selectors_banner', 10, 2 );
309
+add_filter('lsx_customizer_colour_selectors_banner', 'test_lsx_customizer_colour_selectors_banner', 10, 2);
310 310
 
311 311
 /**
312 312
  * Filter: lsx_customizer_colour_selectors_body
313 313
  *
314 314
  * Add new selectors in "body" group of colours
315 315
  */
316
-function test_lsx_customizer_colour_selectors_body( $css, $colors ) {
316
+function test_lsx_customizer_colour_selectors_body($css, $colors) {
317 317
 	$css .= <<<CSS
318 318
 
319 319
 	/* Body TEST */
@@ -340,14 +340,14 @@  discard block
 block discarded – undo
340 340
 
341 341
 	return $css;
342 342
 }
343
-add_filter( 'lsx_customizer_colour_selectors_body', 'test_lsx_customizer_colour_selectors_body', 10, 2 );
343
+add_filter('lsx_customizer_colour_selectors_body', 'test_lsx_customizer_colour_selectors_body', 10, 2);
344 344
 
345 345
 /**
346 346
  * Filter: lsx_customizer_colour_selectors_footer_cta
347 347
  *
348 348
  * Add new selectors in "footer cta" group of colours
349 349
  */
350
-function test_lsx_customizer_colour_selectors_footer_cta( $css, $colors ) {
350
+function test_lsx_customizer_colour_selectors_footer_cta($css, $colors) {
351 351
 	$css .= <<<CSS
352 352
 
353 353
 	/* Footer CTA TEST */
@@ -362,14 +362,14 @@  discard block
 block discarded – undo
362 362
 
363 363
 	return $css;
364 364
 }
365
-add_filter( 'lsx_customizer_colour_selectors_footer_cta', 'test_lsx_customizer_colour_selectors_footer_cta', 10, 2 );
365
+add_filter('lsx_customizer_colour_selectors_footer_cta', 'test_lsx_customizer_colour_selectors_footer_cta', 10, 2);
366 366
 
367 367
 /**
368 368
  * Filter: lsx_customizer_colour_selectors_footer_widgets
369 369
  *
370 370
  * Add new selectors in "footer widgets" group of colours
371 371
  */
372
-function test_lsx_customizer_colour_selectors_footer_widgets( $css, $colors ) {
372
+function test_lsx_customizer_colour_selectors_footer_widgets($css, $colors) {
373 373
 	$css .= <<<CSS
374 374
 
375 375
 	/* Footer Widgets TEST */
@@ -384,14 +384,14 @@  discard block
 block discarded – undo
384 384
 
385 385
 	return $css;
386 386
 }
387
-add_filter( 'lsx_customizer_colour_selectors_footer_widgets', 'test_lsx_customizer_colour_selectors_footer_widgets', 10, 2 );
387
+add_filter('lsx_customizer_colour_selectors_footer_widgets', 'test_lsx_customizer_colour_selectors_footer_widgets', 10, 2);
388 388
 
389 389
 /**
390 390
  * Filter: lsx_customizer_colour_selectors_footer
391 391
  *
392 392
  * Add new selectors in "footer" group of colours
393 393
  */
394
-function test_lsx_customizer_colour_selectors_footer( $css, $colors ) {
394
+function test_lsx_customizer_colour_selectors_footer($css, $colors) {
395 395
 	$css .= <<<CSS
396 396
 
397 397
 	/* Footer TEST */
@@ -406,4 +406,4 @@  discard block
 block discarded – undo
406 406
 
407 407
 	return $css;
408 408
 }
409
-add_filter( 'lsx_customizer_colour_selectors_footer', 'test_lsx_customizer_colour_selectors_footer', 10, 2 );
409
+add_filter('lsx_customizer_colour_selectors_footer', 'test_lsx_customizer_colour_selectors_footer', 10, 2);
Please login to merge, or discard this patch.
includes/lsx-customizer-templates.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * @package   LSX Customizer
6 6
  */
7 7
 
8
-if ( ! function_exists( 'lsx_customizer_checkout_form_wrapper_div' ) ) {
8
+if ( ! function_exists('lsx_customizer_checkout_form_wrapper_div')) {
9 9
 	/**
10 10
 	 * Used to wrap the checkout form in a div and include navigation links
11 11
 	 *
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 	function lsx_customizer_checkout_form_wrapper_div() {
15 15
 		echo '<div class="lsx-checkout-slides">'; ?>
16 16
 			<ul class="lsx-checkout-control-nav">
17
-				<li><a href="#"><?php esc_html_e( 'Your Details', 'lsx-customizer' ); ?></a></li>
18
-				<li><a href="#"><?php esc_html_e( 'Your Order', 'lsx-customizer' ); ?></a></li>
17
+				<li><a href="#"><?php esc_html_e('Your Details', 'lsx-customizer'); ?></a></li>
18
+				<li><a href="#"><?php esc_html_e('Your Order', 'lsx-customizer'); ?></a></li>
19 19
 			</ul>
20 20
 			<?php
21 21
 	}
22 22
 }
23 23
 
24
-if ( ! function_exists( 'lsx_customizer_close_div' ) ) {
24
+if ( ! function_exists('lsx_customizer_close_div')) {
25 25
 	/**
26 26
 	 * Close a div
27 27
 	 *
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	}
33 33
 }
34 34
 
35
-if ( ! function_exists( 'lsx_customizer_checkout_form_wrapper' ) ) {
35
+if ( ! function_exists('lsx_customizer_checkout_form_wrapper')) {
36 36
 	/**
37 37
 	 * Used to wrap the checkout form in a ul
38 38
 	 *
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	}
44 44
 }
45 45
 
46
-if ( ! function_exists( 'lsx_customizer_close_ul' ) ) {
46
+if ( ! function_exists('lsx_customizer_close_ul')) {
47 47
 	/**
48 48
 	 * Close the ul that wraps the checkout form
49 49
 	 *
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 }
56 56
 
57 57
 
58
-if ( ! function_exists( 'lsx_customizer_address_wrapper' ) ) {
58
+if ( ! function_exists('lsx_customizer_address_wrapper')) {
59 59
 	/**
60 60
 	 * Used to wrap the address fields on the ckecout in an li
61 61
 	 *
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	}
67 67
 }
68 68
 
69
-if ( ! function_exists( 'lsx_customizer_close_li' ) ) {
69
+if ( ! function_exists('lsx_customizer_close_li')) {
70 70
 	/**
71 71
 	 * Close an li
72 72
 	 *
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	}
78 78
 }
79 79
 
80
-if ( ! function_exists( 'lsx_customizer_order_review_wrap' ) ) {
80
+if ( ! function_exists('lsx_customizer_order_review_wrap')) {
81 81
 	/**
82 82
 	 * Used to wrap the order review in an li
83 83
 	 *
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	function lsx_customizer_order_review_wrap() {
87 87
 		echo '<li class="order-review">';
88
-		echo '<h3 id="order_review_heading">' . esc_html__( 'Your order', 'lsx-customizer' ) . '</h3>';
88
+		echo '<h3 id="order_review_heading">' . esc_html__('Your order', 'lsx-customizer') . '</h3>';
89 89
 	}
90 90
 }
91 91
 
92
-if ( ! function_exists( 'lsx_customizer_fire_flexslider' ) ) {
92
+if ( ! function_exists('lsx_customizer_fire_flexslider')) {
93 93
 	/**
94 94
 	 * Fire FlexSlider
95 95
 	 *
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 			jQuery( '.lsx-checkout-slides' ).flexslider({
103 103
 				selector:       '.lsx-two-step-checkout > li',
104 104
 				slideshow:      false,
105
-				prevText:       '<?php esc_html_e( 'Back to my details', 'lsx-customizer' ); ?>',
106
-				nextText:       '<?php esc_html_e( 'Proceed to payment', 'lsx-customizer' ); ?>',
105
+				prevText:       '<?php esc_html_e('Back to my details', 'lsx-customizer'); ?>',
106
+				nextText:       '<?php esc_html_e('Proceed to payment', 'lsx-customizer'); ?>',
107 107
 				animationLoop:  false,
108 108
 				manualControls: '.lsx-checkout-control-nav li a',
109 109
 				keyboard:       false,
Please login to merge, or discard this patch.
classes/class-lsx-customizer-frontend.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! class_exists( 'LSX_Customizer_Frontend' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Frontend')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Frontend Class
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 		 * @since 1.0.0
19 19
 		 */
20 20
 		public function __construct() {
21
-			add_action( 'wp_enqueue_scripts', array( $this, 'assets' ), 2999 );
22
-			add_action( 'wp', array( $this, 'layout' ), 2999 );
23
-			add_action( 'wp', array( $this, 'lsx_distraction_free_checkout' ), 2999 );
24
-			add_action( 'wp', array( $this, 'lsx_customizer_two_step_checkout' ) );
21
+			add_action('wp_enqueue_scripts', array($this, 'assets'), 2999);
22
+			add_action('wp', array($this, 'layout'), 2999);
23
+			add_action('wp', array($this, 'lsx_distraction_free_checkout'), 2999);
24
+			add_action('wp', array($this, 'lsx_customizer_two_step_checkout'));
25 25
 		}
26 26
 
27 27
 		/**
@@ -30,21 +30,21 @@  discard block
 block discarded – undo
30 30
 		 * @since 1.0.0
31 31
 		 */
32 32
 		public function assets() {
33
-			wp_enqueue_script( 'lsx-customizer', LSX_CUSTOMIZER_URL . 'assets/js/lsx-customizer.min.js', array( 'jquery' ), LSX_CUSTOMIZER_VER, true );
33
+			wp_enqueue_script('lsx-customizer', LSX_CUSTOMIZER_URL . 'assets/js/lsx-customizer.min.js', array('jquery'), LSX_CUSTOMIZER_VER, true);
34 34
 
35
-			$params = apply_filters( 'lsx_customizer_js_params', array(
36
-				'ajax_url' => admin_url( 'admin-ajax.php' ),
35
+			$params = apply_filters('lsx_customizer_js_params', array(
36
+				'ajax_url' => admin_url('admin-ajax.php'),
37 37
 			));
38 38
 
39
-			wp_localize_script( 'lsx-customizer', 'lsx_customizer_params', $params );
39
+			wp_localize_script('lsx-customizer', 'lsx_customizer_params', $params);
40 40
 
41
-			wp_enqueue_style( 'lsx-customizer', LSX_CUSTOMIZER_URL . 'assets/css/lsx-customizer.css', array(), LSX_CUSTOMIZER_VER );
42
-			wp_style_add_data( 'lsx-customizer', 'rtl', 'replace' );
41
+			wp_enqueue_style('lsx-customizer', LSX_CUSTOMIZER_URL . 'assets/css/lsx-customizer.css', array(), LSX_CUSTOMIZER_VER);
42
+			wp_style_add_data('lsx-customizer', 'rtl', 'replace');
43 43
 
44
-			$two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
45
-			if ( is_checkout() && ! empty( $two_step_checkout ) ) {
44
+			$two_step_checkout = get_theme_mod('lsx_two_step_checkout', false);
45
+			if (is_checkout() && ! empty($two_step_checkout)) {
46 46
 
47
-				wp_enqueue_script( 'flexslider', LSX_CUSTOMIZER_URL . 'assets/js/jquery.flexslider.min.js', array( 'jquery' ), '2.5.0' );
47
+				wp_enqueue_script('flexslider', LSX_CUSTOMIZER_URL . 'assets/js/jquery.flexslider.min.js', array('jquery'), '2.5.0');
48 48
 			}
49 49
 
50 50
 		}
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 		 * @since 1.0.0
56 56
 		 */
57 57
 		public function layout() {
58
-			$theme_credit = get_theme_mod( 'lsx_theme_credit_status', true );
58
+			$theme_credit = get_theme_mod('lsx_theme_credit_status', true);
59 59
 
60
-			if ( false == $theme_credit ) {
61
-				add_filter( 'lsx_credit_link', '__return_false' );
60
+			if (false == $theme_credit) {
61
+				add_filter('lsx_credit_link', '__return_false');
62 62
 			}
63 63
 		}
64 64
 
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
 		 */
71 71
 		public function lsx_distraction_free_checkout() {
72 72
 
73
-			$distraction_free = get_theme_mod( 'lsx_distraction_free_checkout', false );
73
+			$distraction_free = get_theme_mod('lsx_distraction_free_checkout', false);
74 74
 
75
-			if ( is_checkout() && ! empty( $distraction_free ) ) {
76
-				remove_action( 'lsx_body_bottom', 'lsx_wc_footer_bar', 15 );
75
+			if (is_checkout() && ! empty($distraction_free)) {
76
+				remove_action('lsx_body_bottom', 'lsx_wc_footer_bar', 15);
77 77
 
78 78
 			}
79 79
 		}
@@ -85,18 +85,18 @@  discard block
 block discarded – undo
85 85
 		 * @return  void
86 86
 		 */
87 87
 		public function lsx_customizer_two_step_checkout() {
88
-			$two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
89
-
90
-			if ( is_checkout() && ! empty( $two_step_checkout ) ) {
91
-				add_action( 'woocommerce_checkout_before_customer_details', 'lsx_customizer_checkout_form_wrapper_div', 1 );
92
-				add_action( 'woocommerce_checkout_before_customer_details', 'lsx_customizer_checkout_form_wrapper', 2 );
93
-				add_action( 'woocommerce_checkout_order_review', 'lsx_customizer_close_div', 30 );
94
-				add_action( 'woocommerce_checkout_order_review', 'lsx_customizer_close_ul', 30 );
95
-				add_action( 'woocommerce_checkout_before_customer_details', 'lsx_customizer_address_wrapper', 5 );
96
-				add_action( 'woocommerce_checkout_after_customer_details', 'lsx_customizer_close_li' );
97
-				add_action( 'wp_footer', 'lsx_customizer_fire_flexslider' );
98
-				add_action( 'woocommerce_checkout_before_order_review', 'lsx_customizer_order_review_wrap', 1 );
99
-				add_action( 'woocommerce_checkout_after_order_review', 'lsx_customizer_close_li', 40 );
88
+			$two_step_checkout = get_theme_mod('lsx_two_step_checkout', false);
89
+
90
+			if (is_checkout() && ! empty($two_step_checkout)) {
91
+				add_action('woocommerce_checkout_before_customer_details', 'lsx_customizer_checkout_form_wrapper_div', 1);
92
+				add_action('woocommerce_checkout_before_customer_details', 'lsx_customizer_checkout_form_wrapper', 2);
93
+				add_action('woocommerce_checkout_order_review', 'lsx_customizer_close_div', 30);
94
+				add_action('woocommerce_checkout_order_review', 'lsx_customizer_close_ul', 30);
95
+				add_action('woocommerce_checkout_before_customer_details', 'lsx_customizer_address_wrapper', 5);
96
+				add_action('woocommerce_checkout_after_customer_details', 'lsx_customizer_close_li');
97
+				add_action('wp_footer', 'lsx_customizer_fire_flexslider');
98
+				add_action('woocommerce_checkout_before_order_review', 'lsx_customizer_order_review_wrap', 1);
99
+				add_action('woocommerce_checkout_after_order_review', 'lsx_customizer_close_li', 40);
100 100
 			}
101 101
 		}
102 102
 
Please login to merge, or discard this patch.
classes/class-lsx-customizer-colour.php 1 patch
Spacing   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! class_exists( 'LSX_Customizer_Colour' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Class
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 		 * @since 1.0.0
115 115
 		 */
116 116
 		public function __construct() {
117
-			add_action( 'after_setup_theme',                       array( $this, 'after_setup_theme' ), 20 );
118
-			add_action( 'customize_register',                      array( $this, 'customize_register' ), 20 );
119
-			add_action( 'customize_controls_print_footer_scripts', array( $this, 'colour_scheme_css_template' ) );
117
+			add_action('after_setup_theme', array($this, 'after_setup_theme'), 20);
118
+			add_action('customize_register', array($this, 'customize_register'), 20);
119
+			add_action('customize_controls_print_footer_scripts', array($this, 'colour_scheme_css_template'));
120 120
 		}
121 121
 
122 122
 		/**
@@ -126,48 +126,48 @@  discard block
 block discarded – undo
126 126
 		 * @since 1.0.0
127 127
 		 */
128 128
 		public function after_setup_theme() {
129
-			require_once( LSX_CUSTOMIZER_PATH . 'includes/lsx-customizer-colour-options.php' );
130
-			require_once( LSX_CUSTOMIZER_PATH . 'includes/lsx-customizer-colour-deprecated.php' );
131
-			require_once( LSX_CUSTOMIZER_PATH . 'includes/lsx-customizer-templates.php' );
129
+			require_once(LSX_CUSTOMIZER_PATH . 'includes/lsx-customizer-colour-options.php');
130
+			require_once(LSX_CUSTOMIZER_PATH . 'includes/lsx-customizer-colour-deprecated.php');
131
+			require_once(LSX_CUSTOMIZER_PATH . 'includes/lsx-customizer-templates.php');
132 132
 
133
-			if ( class_exists( 'WP_Customize_Control' ) ) {
134
-				require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-control.php' );
133
+			if (class_exists('WP_Customize_Control')) {
134
+				require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-control.php');
135 135
 			}
136 136
 
137
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-button.php' );
137
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-button.php');
138 138
 			$this->button = new LSX_Customizer_Colour_Button;
139 139
 
140
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-button-cta.php' );
140
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-button-cta.php');
141 141
 			$this->button_cta = new LSX_Customizer_Colour_Button_CTA;
142 142
 
143
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-button-secondary.php' );
143
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-button-secondary.php');
144 144
 			$this->button_secondary = new LSX_Customizer_Colour_Button_Secondary;
145 145
 
146
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-button-tertiary.php' );
146
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-button-tertiary.php');
147 147
 			$this->button_tertiary = new LSX_Customizer_Colour_Button_Tertiary;
148 148
 
149
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-top-menu.php' );
149
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-top-menu.php');
150 150
 			$this->top_menu = new LSX_Customizer_Colour_Top_Menu;
151 151
 
152
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-header.php' );
152
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-header.php');
153 153
 			$this->header = new LSX_Customizer_Colour_Header;
154 154
 
155
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-main-menu.php' );
155
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-main-menu.php');
156 156
 			$this->main_menu = new LSX_Customizer_Colour_Main_Menu;
157 157
 
158
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-banner.php' );
158
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-banner.php');
159 159
 			$this->banner = new LSX_Customizer_Colour_Banner;
160 160
 
161
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-body.php' );
161
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-body.php');
162 162
 			$this->body = new LSX_Customizer_Colour_Body;
163 163
 
164
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-footer-cta.php' );
164
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-footer-cta.php');
165 165
 			$this->footer_cta = new LSX_Customizer_Colour_Footer_CTA;
166 166
 
167
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-footer-widgets.php' );
167
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-footer-widgets.php');
168 168
 			$this->footer_widgets = new LSX_Customizer_Colour_Footer_Widgets;
169 169
 
170
-			require_once( LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-footer.php' );
170
+			require_once(LSX_CUSTOMIZER_PATH . 'classes/class-lsx-customizer-colour-footer.php');
171 171
 			$this->footer = new LSX_Customizer_Colour_Footer;
172 172
 		}
173 173
 
@@ -177,166 +177,166 @@  discard block
 block discarded – undo
177 177
 		 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
178 178
 		 * @since 1.0.0
179 179
 		 */
180
-		public function customize_register( $wp_customize ) {
180
+		public function customize_register($wp_customize) {
181 181
 			global $customizer_colour_names;
182 182
 			global $customizer_colour_choices;
183 183
 
184 184
 			/**
185 185
 			 * Colors
186 186
 			 */
187
-			$wp_customize->add_panel( 'colors' , array(
188
-				'title'             => esc_html__( 'Colors', 'lsx-customizer' ),
187
+			$wp_customize->add_panel('colors', array(
188
+				'title'             => esc_html__('Colors', 'lsx-customizer'),
189 189
 				'priority'          => 60,
190
-			) );
190
+			));
191 191
 
192 192
 			/**
193 193
 			 * Colors - Sections
194 194
 			 */
195
-			$wp_customize->add_section( 'colors-core' , array(
196
-				'title'             => esc_html__( 'Color Scheme', 'lsx-customizer' ),
195
+			$wp_customize->add_section('colors-core', array(
196
+				'title'             => esc_html__('Color Scheme', 'lsx-customizer'),
197 197
 				'priority'          => 1,
198 198
 				'panel'             => 'colors',
199
-			) );
199
+			));
200 200
 
201
-			$wp_customize->add_section( 'colors-button' , array(
202
-				'title'             => esc_html__( 'Button', 'lsx-customizer' ),
201
+			$wp_customize->add_section('colors-button', array(
202
+				'title'             => esc_html__('Button', 'lsx-customizer'),
203 203
 				'priority'          => 2,
204 204
 				'panel'             => 'colors',
205
-			) );
205
+			));
206 206
 
207
-			$wp_customize->add_section( 'colors-button-cta' , array(
208
-				'title'             => esc_html__( 'Button CTA', 'lsx-customizer' ),
207
+			$wp_customize->add_section('colors-button-cta', array(
208
+				'title'             => esc_html__('Button CTA', 'lsx-customizer'),
209 209
 				'priority'          => 3,
210 210
 				'panel'             => 'colors',
211
-			) );
211
+			));
212 212
 
213
-			$wp_customize->add_section( 'colors-button-secondary' , array(
214
-				'title'             => esc_html__( 'Button Secondary', 'lsx-customizer' ),
213
+			$wp_customize->add_section('colors-button-secondary', array(
214
+				'title'             => esc_html__('Button Secondary', 'lsx-customizer'),
215 215
 				'priority'          => 4,
216 216
 				'panel'             => 'colors',
217
-			) );
217
+			));
218 218
 
219
-			$wp_customize->add_section( 'colors-button-tertiary' , array(
220
-				'title'             => esc_html__( 'Button Tertiary', 'lsx-customizer' ),
219
+			$wp_customize->add_section('colors-button-tertiary', array(
220
+				'title'             => esc_html__('Button Tertiary', 'lsx-customizer'),
221 221
 				'priority'          => 5,
222 222
 				'panel'             => 'colors',
223
-			) );
223
+			));
224 224
 
225
-			$wp_customize->add_section( 'colors-top-menu' , array(
226
-				'title'             => esc_html__( 'Top Menu', 'lsx-customizer' ),
225
+			$wp_customize->add_section('colors-top-menu', array(
226
+				'title'             => esc_html__('Top Menu', 'lsx-customizer'),
227 227
 				'priority'          => 6,
228 228
 				'panel'             => 'colors',
229
-			) );
229
+			));
230 230
 
231
-			$wp_customize->add_section( 'colors-header' , array(
232
-				'title'             => esc_html__( 'Header', 'lsx-customizer' ),
231
+			$wp_customize->add_section('colors-header', array(
232
+				'title'             => esc_html__('Header', 'lsx-customizer'),
233 233
 				'priority'          => 7,
234 234
 				'panel'             => 'colors',
235
-			) );
235
+			));
236 236
 
237
-			$wp_customize->add_section( 'colors-main-menu' , array(
238
-				'title'             => esc_html__( 'Main Menu', 'lsx-customizer' ),
237
+			$wp_customize->add_section('colors-main-menu', array(
238
+				'title'             => esc_html__('Main Menu', 'lsx-customizer'),
239 239
 				'priority'          => 8,
240 240
 				'panel'             => 'colors',
241
-			) );
241
+			));
242 242
 
243
-			$wp_customize->add_section( 'colors-banner' , array(
244
-				'title'             => esc_html__( 'Banner', 'lsx-customizer' ),
243
+			$wp_customize->add_section('colors-banner', array(
244
+				'title'             => esc_html__('Banner', 'lsx-customizer'),
245 245
 				'priority'          => 9,
246 246
 				'panel'             => 'colors',
247
-			) );
247
+			));
248 248
 
249
-			$wp_customize->add_section( 'colors-body' , array(
250
-				'title'             => esc_html__( 'Body', 'lsx-customizer' ),
249
+			$wp_customize->add_section('colors-body', array(
250
+				'title'             => esc_html__('Body', 'lsx-customizer'),
251 251
 				'priority'          => 10,
252 252
 				'panel'             => 'colors',
253
-			) );
253
+			));
254 254
 
255
-			$wp_customize->add_section( 'colors-footer-cta' , array(
256
-				'title'             => esc_html__( 'Footer CTA', 'lsx-customizer' ),
255
+			$wp_customize->add_section('colors-footer-cta', array(
256
+				'title'             => esc_html__('Footer CTA', 'lsx-customizer'),
257 257
 				'priority'          => 11,
258 258
 				'panel'             => 'colors',
259
-			) );
259
+			));
260 260
 
261
-			$wp_customize->add_section( 'colors-footer-widgets' , array(
262
-				'title'             => esc_html__( 'Footer Widgets', 'lsx-customizer' ),
261
+			$wp_customize->add_section('colors-footer-widgets', array(
262
+				'title'             => esc_html__('Footer Widgets', 'lsx-customizer'),
263 263
 				'priority'          => 12,
264 264
 				'panel'             => 'colors',
265
-			) );
265
+			));
266 266
 
267
-			$wp_customize->add_section( 'colors-footer' , array(
268
-				'title'             => esc_html__( 'Footer', 'lsx-customizer' ),
267
+			$wp_customize->add_section('colors-footer', array(
268
+				'title'             => esc_html__('Footer', 'lsx-customizer'),
269 269
 				'priority'          => 13,
270 270
 				'panel'             => 'colors',
271
-			) );
271
+			));
272 272
 
273 273
 			/**
274 274
 			 * Color Scheme
275 275
 			 */
276
-			$wp_customize->add_setting( 'color_scheme', array(
276
+			$wp_customize->add_setting('color_scheme', array(
277 277
 				'default'           => 'default',
278 278
 				'type'	            => 'theme_mod',
279 279
 				'transport'         => 'postMessage',
280
-			) );
280
+			));
281 281
 
282
-			$wp_customize->add_control( new LSX_Customizer_Colour_Control( $wp_customize, 'color_scheme', array(
283
-				'label'             => esc_html__( 'Base Color Scheme', 'lsx-customizer' ),
282
+			$wp_customize->add_control(new LSX_Customizer_Colour_Control($wp_customize, 'color_scheme', array(
283
+				'label'             => esc_html__('Base Color Scheme', 'lsx-customizer'),
284 284
 				'section'           => 'colors-core',
285 285
 				'type'              => 'select',
286 286
 				'priority'          => 1,
287 287
 				'choices'           => $customizer_colour_choices,
288
-			) ) );
288
+			)));
289 289
 
290 290
 			/**
291 291
 			 * Colors
292 292
 			 */
293
-			foreach ( $customizer_colour_names as $key => $value ) {
293
+			foreach ($customizer_colour_names as $key => $value) {
294 294
 				$sanitize_callback = 'sanitize_hex_color';
295 295
 
296
-				if ( 'background_color' === $key ) {
296
+				if ('background_color' === $key) {
297 297
 					$sanitize_callback = 'sanitize_hex_color_no_hash';
298 298
 				}
299 299
 
300 300
 				$section = 'colors-core';
301 301
 
302
-				if ( preg_match( '/^button_cta_.*/', $key ) ) {
302
+				if (preg_match('/^button_cta_.*/', $key)) {
303 303
 					$section = 'colors-button-cta';
304
-				} elseif ( preg_match( '/^button_secondary_.*/', $key ) ) {
304
+				} elseif (preg_match('/^button_secondary_.*/', $key)) {
305 305
 					$section = 'colors-button-secondary';
306
-				} elseif ( preg_match( '/^button_tertiary_.*/', $key ) ) {
306
+				} elseif (preg_match('/^button_tertiary_.*/', $key)) {
307 307
 					$section = 'colors-button-tertiary';
308
-				} elseif ( preg_match( '/^button_.*/', $key ) ) {
308
+				} elseif (preg_match('/^button_.*/', $key)) {
309 309
 					$section = 'colors-button';
310
-				} elseif ( preg_match( '/^top_menu_.*/', $key ) ) {
310
+				} elseif (preg_match('/^top_menu_.*/', $key)) {
311 311
 					$section = 'colors-top-menu';
312
-				} elseif ( preg_match( '/^header_.*/', $key ) ) {
312
+				} elseif (preg_match('/^header_.*/', $key)) {
313 313
 					$section = 'colors-header';
314
-				} elseif ( preg_match( '/^main_menu_.*/', $key ) ) {
314
+				} elseif (preg_match('/^main_menu_.*/', $key)) {
315 315
 					$section = 'colors-main-menu';
316
-				} elseif ( preg_match( '/^banner_.*/', $key ) ) {
316
+				} elseif (preg_match('/^banner_.*/', $key)) {
317 317
 					$section = 'colors-banner';
318
-				} elseif ( preg_match( '/^body_.*/', $key ) || 'background_color' === $key ) {
318
+				} elseif (preg_match('/^body_.*/', $key) || 'background_color' === $key) {
319 319
 					$section = 'colors-body';
320
-				} elseif ( preg_match( '/^footer_cta_.*/', $key ) ) {
320
+				} elseif (preg_match('/^footer_cta_.*/', $key)) {
321 321
 					$section = 'colors-footer-cta';
322
-				} elseif ( preg_match( '/^footer_widgets_.*/', $key ) ) {
322
+				} elseif (preg_match('/^footer_widgets_.*/', $key)) {
323 323
 					$section = 'colors-footer-widgets';
324
-				} elseif ( preg_match( '/^footer_.*/', $key ) ) {
324
+				} elseif (preg_match('/^footer_.*/', $key)) {
325 325
 					$section = 'colors-footer';
326 326
 				}
327 327
 
328
-				$wp_customize->add_setting( $key, array(
329
-					'default'           => $customizer_colour_choices['default']['colors'][ $key ],
328
+				$wp_customize->add_setting($key, array(
329
+					'default'           => $customizer_colour_choices['default']['colors'][$key],
330 330
 					'type'	            => 'theme_mod',
331 331
 					'transport'         => 'postMessage',
332 332
 					'sanitize_callback' => $sanitize_callback,
333
-				) );
333
+				));
334 334
 
335
-				$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $key, array(
335
+				$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, $key, array(
336 336
 					'label'             => $value,
337 337
 					'section'           => $section,
338 338
 					'settings'          => $key,
339
-				) ) );
339
+				)));
340 340
 			}
341 341
 		}
342 342
 
@@ -350,26 +350,26 @@  discard block
 block discarded – undo
350 350
 
351 351
 			$colors = array();
352 352
 
353
-			foreach ( $customizer_colour_names as $key => $value ) {
354
-				$colors[ $key ] = 'unquote("{{ data.' . $key . ' }}")';
353
+			foreach ($customizer_colour_names as $key => $value) {
354
+				$colors[$key] = 'unquote("{{ data.' . $key . ' }}")';
355 355
 			}
356 356
 			?>
357 357
 			<script type="text/html" id="tmpl-lsx-color-scheme">
358
-				<?php echo esc_attr( $this->top_menu->get_css( $colors ) ); ?>
359
-				<?php echo esc_attr( $this->header->get_css( $colors ) ); ?>
360
-				<?php echo esc_attr( $this->main_menu->get_css( $colors ) ); ?>
358
+				<?php echo esc_attr($this->top_menu->get_css($colors)); ?>
359
+				<?php echo esc_attr($this->header->get_css($colors)); ?>
360
+				<?php echo esc_attr($this->main_menu->get_css($colors)); ?>
361 361
 
362
-				<?php echo esc_attr( $this->banner->get_css( $colors ) ); ?>
363
-				<?php echo esc_attr( $this->body->get_css( $colors ) ); ?>
362
+				<?php echo esc_attr($this->banner->get_css($colors)); ?>
363
+				<?php echo esc_attr($this->body->get_css($colors)); ?>
364 364
 
365
-				<?php echo esc_attr( $this->footer_cta->get_css( $colors ) ); ?>
366
-				<?php echo esc_attr( $this->footer_widgets->get_css( $colors ) ); ?>
367
-				<?php echo esc_attr( $this->footer->get_css( $colors ) ); ?>
365
+				<?php echo esc_attr($this->footer_cta->get_css($colors)); ?>
366
+				<?php echo esc_attr($this->footer_widgets->get_css($colors)); ?>
367
+				<?php echo esc_attr($this->footer->get_css($colors)); ?>
368 368
 
369
-				<?php echo esc_attr( $this->button->get_css( $colors ) ); ?>
370
-				<?php echo esc_attr( $this->button_cta->get_css( $colors ) ); ?>
371
-				<?php echo esc_attr( $this->button_secondary->get_css( $colors ) ); ?>
372
-				<?php echo esc_attr( $this->button_tertiary->get_css( $colors ) ); ?>
369
+				<?php echo esc_attr($this->button->get_css($colors)); ?>
370
+				<?php echo esc_attr($this->button_cta->get_css($colors)); ?>
371
+				<?php echo esc_attr($this->button_secondary->get_css($colors)); ?>
372
+				<?php echo esc_attr($this->button_tertiary->get_css($colors)); ?>
373 373
 			</script>
374 374
 			<?php
375 375
 		}
@@ -379,16 +379,16 @@  discard block
 block discarded – undo
379 379
 		 *
380 380
 		 * @since 1.0.0
381 381
 		 */
382
-		public function scss_to_css( $scss ) {
382
+		public function scss_to_css($scss) {
383 383
 			$css                 = '';
384 384
 			$scss_php_file       = LSX_CUSTOMIZER_PATH . 'vendor/leafo/scssphp/scss.inc.php';
385 385
 			$lsx_theme_sass_file = get_template_directory() . '/assets/css/scss/lsx.scss';
386 386
 
387
-			if ( ! empty( $scss ) && file_exists( $scss_php_file ) && file_exists( $lsx_theme_sass_file ) ) {
387
+			if ( ! empty($scss) && file_exists($scss_php_file) && file_exists($lsx_theme_sass_file)) {
388 388
 				require_once $scss_php_file;
389 389
 
390 390
 				$compiler = new \Leafo\ScssPhp\Compiler();
391
-				$compiler->setFormatter( 'Leafo\ScssPhp\Formatter\Compact' );
391
+				$compiler->setFormatter('Leafo\ScssPhp\Formatter\Compact');
392 392
 
393 393
 				try {
394 394
 					$scss = '
@@ -398,8 +398,8 @@  discard block
 block discarded – undo
398 398
 						' . $scss . '
399 399
 					';
400 400
 
401
-					$css = $compiler->compile( $scss );
402
-				} catch ( \Exception $e ) {
401
+					$css = $compiler->compile($scss);
402
+				} catch (\Exception $e) {
403 403
 					$error = $e->getMessage();
404 404
 					return "/*\n\n\$error:\n\n{$error}\n\n\$scss:\n\n{$scss} */";
405 405
 				}
@@ -413,17 +413,17 @@  discard block
 block discarded – undo
413 413
 		 *
414 414
 		 * @since 1.0.0
415 415
 		 */
416
-		public static function hex2rgb( $color ) {
417
-			$color = trim( $color, '#' );
418
-
419
-			if ( strlen( $color ) === 3 ) {
420
-				$r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) );
421
-				$g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) );
422
-				$b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) );
423
-			} elseif ( strlen( $color ) === 6 ) {
424
-				$r = hexdec( substr( $color, 0, 2 ) );
425
-				$g = hexdec( substr( $color, 2, 2 ) );
426
-				$b = hexdec( substr( $color, 4, 2 ) );
416
+		public static function hex2rgb($color) {
417
+			$color = trim($color, '#');
418
+
419
+			if (strlen($color) === 3) {
420
+				$r = hexdec(substr($color, 0, 1) . substr($color, 0, 1));
421
+				$g = hexdec(substr($color, 1, 1) . substr($color, 1, 1));
422
+				$b = hexdec(substr($color, 2, 1) . substr($color, 2, 1));
423
+			} elseif (strlen($color) === 6) {
424
+				$r = hexdec(substr($color, 0, 2));
425
+				$g = hexdec(substr($color, 2, 2));
426
+				$b = hexdec(substr($color, 4, 2));
427 427
 			} else {
428 428
 				return array();
429 429
 			}
@@ -443,11 +443,11 @@  discard block
 block discarded – undo
443 443
 		public function get_color_scheme() {
444 444
 			global $customizer_colour_choices;
445 445
 
446
-			$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
446
+			$color_scheme_option = get_theme_mod('color_scheme', 'default');
447 447
 			$color_schemes = $customizer_colour_choices;
448 448
 
449
-			if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
450
-				return $color_schemes[ $color_scheme_option ]['colors'];
449
+			if (array_key_exists($color_scheme_option, $color_schemes)) {
450
+				return $color_schemes[$color_scheme_option]['colors'];
451 451
 			}
452 452
 
453 453
 			return $color_schemes['default']['colors'];
Please login to merge, or discard this patch.
classes/class-lsx-customizer-woocommerce.php 1 patch
Spacing   +217 added lines, -217 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! class_exists( 'LSX_Customizer_WooCommerce' ) ) {
2
+if ( ! class_exists('LSX_Customizer_WooCommerce')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer WooCommerce Class
@@ -18,24 +18,24 @@  discard block
 block discarded – undo
18 18
 		 * @since 1.1.1
19 19
 		 */
20 20
 		public function __construct() {
21
-			add_action( 'customize_register', array( $this, 'customize_register' ), 20 );
21
+			add_action('customize_register', array($this, 'customize_register'), 20);
22 22
 
23
-			add_filter( 'body_class', array( $this, 'body_class' ), 2999 );
23
+			add_filter('body_class', array($this, 'body_class'), 2999);
24 24
 
25
-			add_action( 'template_redirect', array( $this, 'thankyou_page' ), 2999 );
25
+			add_action('template_redirect', array($this, 'thankyou_page'), 2999);
26 26
 
27
-			if ( empty( get_theme_mod( 'lsx_two_step_checkout', false ) ) ) {
28
-				add_action( 'lsx_entry_inside_top', array( $this, 'checkout_steps' ), 15 );
27
+			if (empty(get_theme_mod('lsx_two_step_checkout', false))) {
28
+				add_action('lsx_entry_inside_top', array($this, 'checkout_steps'), 15);
29 29
 			}
30 30
 
31
-			add_action( 'wp', array( $this, 'cart_extra_html' ), 2999 );
32
-			add_action( 'wp', array( $this, 'checkout_extra_html' ), 2999 );
33
-			add_action( 'lsx_wc_cart_menu_item_position', array( $this, 'cart_menu_item_position' ) );
34
-			add_action( 'lsx_wc_cart_menu_item_class', array( $this, 'cart_menu_item_class' ) );
31
+			add_action('wp', array($this, 'cart_extra_html'), 2999);
32
+			add_action('wp', array($this, 'checkout_extra_html'), 2999);
33
+			add_action('lsx_wc_cart_menu_item_position', array($this, 'cart_menu_item_position'));
34
+			add_action('lsx_wc_cart_menu_item_class', array($this, 'cart_menu_item_class'));
35 35
 
36
-			add_filter( 'wp_nav_menu_items', array( $this, 'my_account_menu_item' ), 9, 2 );
37
-			add_action( 'lsx_wc_my_account_menu_item_position', array( $this, 'my_account_menu_item_position' ) );
38
-			add_action( 'lsx_wc_my_account_menu_item_class', array( $this, 'my_account_menu_item_class' ) );
36
+			add_filter('wp_nav_menu_items', array($this, 'my_account_menu_item'), 9, 2);
37
+			add_action('lsx_wc_my_account_menu_item_position', array($this, 'my_account_menu_item_position'));
38
+			add_action('lsx_wc_my_account_menu_item_class', array($this, 'my_account_menu_item_class'));
39 39
 		}
40 40
 
41 41
 		/**
@@ -44,254 +44,254 @@  discard block
 block discarded – undo
44 44
 		 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
45 45
 		 * @since 1.1.1
46 46
 		 */
47
-		public function customize_register( $wp_customize ) {
47
+		public function customize_register($wp_customize) {
48 48
 			/**
49 49
 			 * Checkout.
50 50
 			 */
51 51
 
52
-			$wp_customize->add_section( 'lsx-wc-checkout' , array(
53
-				'title'       => esc_html__( 'LSX Checkout', 'lsx-customizer' ),
54
-				'description' => esc_html__( 'Change the WooCommerce checkout settings.', 'lsx-customizer' ),
52
+			$wp_customize->add_section('lsx-wc-checkout', array(
53
+				'title'       => esc_html__('LSX Checkout', 'lsx-customizer'),
54
+				'description' => esc_html__('Change the WooCommerce checkout settings.', 'lsx-customizer'),
55 55
 				'panel'       => 'woocommerce',
56 56
 				'priority'    => 3,
57
-			) );
57
+			));
58 58
 
59
-			$wp_customize->add_setting( 'lsx_checkout_steps', array(
59
+			$wp_customize->add_setting('lsx_checkout_steps', array(
60 60
 				'default'           => true,
61
-				'sanitize_callback' => array( $this, 'sanitize_checkbox' ),
62
-			) );
61
+				'sanitize_callback' => array($this, 'sanitize_checkbox'),
62
+			));
63 63
 
64
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_checkout_steps', array(
65
-				'label'       => esc_html__( 'Steps', 'lsx-customizer' ),
66
-				'description' => esc_html__( 'Enable the checkout steps header.', 'lsx-customizer' ),
64
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_checkout_steps', array(
65
+				'label'       => esc_html__('Steps', 'lsx-customizer'),
66
+				'description' => esc_html__('Enable the checkout steps header.', 'lsx-customizer'),
67 67
 				'section'     => 'lsx-wc-checkout',
68 68
 				'settings'    => 'lsx_checkout_steps',
69 69
 				'type'        => 'checkbox',
70 70
 				'priority'    => 1,
71
-			) ) );
71
+			)));
72 72
 
73 73
 			/**
74 74
 			 * Checkout Layout
75 75
 			 */
76
-			$wp_customize->add_setting( 'lsx_wc_checkout_layout', array(
76
+			$wp_customize->add_setting('lsx_wc_checkout_layout', array(
77 77
 				'default' => 'default',
78
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
79
-			) );
78
+				'sanitize_callback' => array($this, 'sanitize_select'),
79
+			));
80 80
 
81
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_checkout_layout', array(
82
-				'label'       => esc_html__( 'Layout', 'lsx-customizer' ),
83
-				'description' => esc_html__( 'WooCommerce checkout layout.', 'lsx-customizer' ),
81
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_checkout_layout', array(
82
+				'label'       => esc_html__('Layout', 'lsx-customizer'),
83
+				'description' => esc_html__('WooCommerce checkout layout.', 'lsx-customizer'),
84 84
 				'section'     => 'lsx-wc-checkout',
85 85
 				'settings'    => 'lsx_wc_checkout_layout',
86 86
 				'type'        => 'select',
87 87
 				'priority'    => 2,
88 88
 				'choices'     => array(
89
-					'default' => esc_html__( 'Default', 'lsx-customizer' ),
90
-					'stacked' => esc_html__( 'Stacked', 'lsx-customizer' ),
91
-					'columns' => esc_html__( 'Columns', 'lsx-customizer' ),
89
+					'default' => esc_html__('Default', 'lsx-customizer'),
90
+					'stacked' => esc_html__('Stacked', 'lsx-customizer'),
91
+					'columns' => esc_html__('Columns', 'lsx-customizer'),
92 92
 				),
93
-			) ) );
93
+			)));
94 94
 
95
-			$wp_customize->add_setting( 'lsx_wc_checkout_thankyou_page', array(
95
+			$wp_customize->add_setting('lsx_wc_checkout_thankyou_page', array(
96 96
 				'default' => '0',
97
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
98
-			) );
97
+				'sanitize_callback' => array($this, 'sanitize_select'),
98
+			));
99 99
 
100 100
 			$choices = array(
101
-				'0' => esc_html__( 'Default', 'lsx-customizer' ),
101
+				'0' => esc_html__('Default', 'lsx-customizer'),
102 102
 			);
103 103
 
104 104
 			/**
105 105
 			 * Distraction Free Checkout
106 106
 			 */
107
-			$wp_customize->add_setting( 'lsx_distraction_free_checkout', array(
108
-				'sanitize_callback' => array( $this, 'sanitize_checkbox' ),
109
-			) );
107
+			$wp_customize->add_setting('lsx_distraction_free_checkout', array(
108
+				'sanitize_callback' => array($this, 'sanitize_checkbox'),
109
+			));
110 110
 
111
-			$wp_customize->add_control( new WP_Customize_Control(
111
+			$wp_customize->add_control(new WP_Customize_Control(
112 112
 				$wp_customize,
113 113
 				'lsx_distraction_free_checkout',
114 114
 				array(
115
-					'label'       => esc_html__( 'Distraction Free Checkout', 'lsx-customizer' ),
116
-					'description' => esc_html__( 'Removes all clutter from the checkout, allowing the customer to focus entirely on that procedure. Removes the stepped cart and checkout.', 'lsx-customizer' ),
115
+					'label'       => esc_html__('Distraction Free Checkout', 'lsx-customizer'),
116
+					'description' => esc_html__('Removes all clutter from the checkout, allowing the customer to focus entirely on that procedure. Removes the stepped cart and checkout.', 'lsx-customizer'),
117 117
 					'section'     => 'lsx-wc-checkout',
118 118
 					'settings'    => 'lsx_distraction_free_checkout',
119 119
 					'type'        => 'checkbox',
120 120
 					'priority'    => 3,
121 121
 				)
122
-			) );
122
+			));
123 123
 
124 124
 			/**
125 125
 			 * Two Step Checkout
126 126
 			 */
127
-			$wp_customize->add_setting( 'lsx_two_step_checkout', array(
128
-				'sanitize_callback' => array( $this, 'sanitize_checkbox' ),
129
-			) );
127
+			$wp_customize->add_setting('lsx_two_step_checkout', array(
128
+				'sanitize_callback' => array($this, 'sanitize_checkbox'),
129
+			));
130 130
 
131
-			$wp_customize->add_control( new WP_Customize_Control(
131
+			$wp_customize->add_control(new WP_Customize_Control(
132 132
 				$wp_customize,
133 133
 				'lsx_two_step_checkout',
134 134
 				array(
135
-					'label'       => esc_html__( 'Two Step Checkout', 'lsx-customizer' ),
136
-					'description' => esc_html__( 'Separates the customer details collection form, and the order summary / payment details form in to two separate pages. Removes the stepped cart and checkout.', 'lsx-customizer' ),
135
+					'label'       => esc_html__('Two Step Checkout', 'lsx-customizer'),
136
+					'description' => esc_html__('Separates the customer details collection form, and the order summary / payment details form in to two separate pages. Removes the stepped cart and checkout.', 'lsx-customizer'),
137 137
 					'section'     => 'lsx-wc-checkout',
138 138
 					'settings'    => 'lsx_two_step_checkout',
139 139
 					'type'        => 'checkbox',
140 140
 					'priority'    => 4,
141 141
 				)
142
-			) );
142
+			));
143 143
 
144 144
 			/**
145 145
 			 * Thank you page options
146 146
 			 */
147 147
 			$pages = get_pages();
148 148
 
149
-			foreach ( $pages as $key => $page ) {
150
-				$choices[ $page->ID ] = $page->post_title;
149
+			foreach ($pages as $key => $page) {
150
+				$choices[$page->ID] = $page->post_title;
151 151
 			}
152 152
 
153
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_checkout_thankyou_page', array(
154
-				'label'       => esc_html__( 'Thank You Page', 'lsx-customizer' ),
155
-				'description' => esc_html__( 'WooCommerce checkout thank you page.', 'lsx-customizer' ),
153
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_checkout_thankyou_page', array(
154
+				'label'       => esc_html__('Thank You Page', 'lsx-customizer'),
155
+				'description' => esc_html__('WooCommerce checkout thank you page.', 'lsx-customizer'),
156 156
 				'section'     => 'lsx-wc-checkout',
157 157
 				'settings'    => 'lsx_wc_checkout_thankyou_page',
158 158
 				'type'        => 'select',
159 159
 				'priority'    => 5,
160 160
 				'choices'     => $choices,
161
-			) ) );
161
+			)));
162 162
 
163
-			$wp_customize->add_setting( 'lsx_wc_checkout_extra_html', array(
163
+			$wp_customize->add_setting('lsx_wc_checkout_extra_html', array(
164 164
 				'default'           => '',
165 165
 				'sanitize_callback' => 'wp_kses_post',
166
-			) );
166
+			));
167 167
 
168
-			$wp_customize->add_control( new LSX_Customizer_Wysiwyg_Control( $wp_customize, 'lsx_wc_checkout_extra_html', array(
169
-				'label'       => esc_html__( 'Extra HTML', 'lsx-customizer' ),
170
-				'description' => esc_html__( 'Extra HTML to display at checkout page (bottom/right).', 'lsx-customizer' ),
168
+			$wp_customize->add_control(new LSX_Customizer_Wysiwyg_Control($wp_customize, 'lsx_wc_checkout_extra_html', array(
169
+				'label'       => esc_html__('Extra HTML', 'lsx-customizer'),
170
+				'description' => esc_html__('Extra HTML to display at checkout page (bottom/right).', 'lsx-customizer'),
171 171
 				'section'     => 'lsx-wc-checkout',
172 172
 				'settings'    => 'lsx_wc_checkout_extra_html',
173 173
 				'priority'    => 6,
174 174
 				'type'        => 'wysiwyg',
175
-			) ) );
175
+			)));
176 176
 
177 177
 			/**
178 178
 			 * Cart.
179 179
 			 */
180 180
 
181
-			$wp_customize->add_setting( 'lsx_wc_cart_menu_item_style', array(
181
+			$wp_customize->add_setting('lsx_wc_cart_menu_item_style', array(
182 182
 				'default' => 'extended',
183
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
184
-			) );
183
+				'sanitize_callback' => array($this, 'sanitize_select'),
184
+			));
185 185
 
186
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_cart_menu_item_style', array(
187
-				'label'       => esc_html__( 'Menu Item Style', 'lsx-customizer' ),
188
-				'description' => esc_html__( 'WooCommerce menu item cart style.', 'lsx-customizer' ),
186
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_cart_menu_item_style', array(
187
+				'label'       => esc_html__('Menu Item Style', 'lsx-customizer'),
188
+				'description' => esc_html__('WooCommerce menu item cart style.', 'lsx-customizer'),
189 189
 				'section'     => 'lsx-wc-cart',
190 190
 				'settings'    => 'lsx_wc_cart_menu_item_style',
191 191
 				'type'        => 'select',
192 192
 				'priority'    => 2,
193 193
 				'choices'     => array(
194
-					'simple'   => esc_html__( 'Simple', 'lsx-customizer' ),
195
-					'extended' => esc_html__( 'Extended', 'lsx-customizer' ),
194
+					'simple'   => esc_html__('Simple', 'lsx-customizer'),
195
+					'extended' => esc_html__('Extended', 'lsx-customizer'),
196 196
 				),
197
-			) ) );
197
+			)));
198 198
 
199
-			$wp_customize->add_setting( 'lsx_wc_cart_menu_item_position', array(
199
+			$wp_customize->add_setting('lsx_wc_cart_menu_item_position', array(
200 200
 				'default' => 'main-menu-in',
201
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
202
-			) );
201
+				'sanitize_callback' => array($this, 'sanitize_select'),
202
+			));
203 203
 
204
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_cart_menu_item_position', array(
205
-				'label'       => esc_html__( 'Menu Item Position', 'lsx-customizer' ),
206
-				'description' => esc_html__( 'WooCommerce menu item cart position.', 'lsx-customizer' ),
204
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_cart_menu_item_position', array(
205
+				'label'       => esc_html__('Menu Item Position', 'lsx-customizer'),
206
+				'description' => esc_html__('WooCommerce menu item cart position.', 'lsx-customizer'),
207 207
 				'section'     => 'lsx-wc-cart',
208 208
 				'settings'    => 'lsx_wc_cart_menu_item_position',
209 209
 				'type'        => 'select',
210 210
 				'priority'    => 3,
211 211
 				'choices'     => array(
212
-					'main-menu-in'   => esc_html__( 'Main Menu (as last item)', 'lsx-customizer' ),
213
-					'main-menu-out'  => esc_html__( 'Main Menu (as last item, right aligned)', 'lsx-customizer' ),
214
-					'top-menu-left'  => esc_html__( 'Top Menu (left)', 'lsx-customizer' ),
215
-					'top-menu-right' => esc_html__( 'Top Menu (right)', 'lsx-customizer' ),
212
+					'main-menu-in'   => esc_html__('Main Menu (as last item)', 'lsx-customizer'),
213
+					'main-menu-out'  => esc_html__('Main Menu (as last item, right aligned)', 'lsx-customizer'),
214
+					'top-menu-left'  => esc_html__('Top Menu (left)', 'lsx-customizer'),
215
+					'top-menu-right' => esc_html__('Top Menu (right)', 'lsx-customizer'),
216 216
 				),
217
-			) ) );
217
+			)));
218 218
 
219
-			$wp_customize->add_setting( 'lsx_wc_cart_extra_html', array(
219
+			$wp_customize->add_setting('lsx_wc_cart_extra_html', array(
220 220
 				'default'           => '',
221 221
 				'sanitize_callback' => 'wp_kses_post',
222
-			) );
222
+			));
223 223
 
224
-			$wp_customize->add_control( new LSX_Customizer_Wysiwyg_Control( $wp_customize, 'lsx_wc_cart_extra_html', array(
225
-				'label'       => esc_html__( 'Extra HTML', 'lsx-customizer' ),
226
-				'description' => esc_html__( 'Extra HTML to display at cart page (bottom/left).', 'lsx-customizer' ),
224
+			$wp_customize->add_control(new LSX_Customizer_Wysiwyg_Control($wp_customize, 'lsx_wc_cart_extra_html', array(
225
+				'label'       => esc_html__('Extra HTML', 'lsx-customizer'),
226
+				'description' => esc_html__('Extra HTML to display at cart page (bottom/left).', 'lsx-customizer'),
227 227
 				'section'     => 'lsx-wc-cart',
228 228
 				'settings'    => 'lsx_wc_cart_extra_html',
229 229
 				'priority'    => 4,
230 230
 				'type'        => 'wysiwyg',
231
-			) ) );
231
+			)));
232 232
 
233 233
 			/**
234 234
 			 * My Account.
235 235
 			 */
236 236
 
237
-			$wp_customize->add_section( 'lsx-wc-my-account' , array(
238
-				'title'       => esc_html__( 'LSX My Account', 'lsx-customizer' ),
239
-				'description' => esc_html__( 'Change the WooCommerce My Account settings.', 'lsx-customizer' ),
237
+			$wp_customize->add_section('lsx-wc-my-account', array(
238
+				'title'       => esc_html__('LSX My Account', 'lsx-customizer'),
239
+				'description' => esc_html__('Change the WooCommerce My Account settings.', 'lsx-customizer'),
240 240
 				'panel'       => 'woocommerce',
241 241
 				'priority'    => 4,
242
-			) );
242
+			));
243 243
 
244
-			$wp_customize->add_setting( 'lsx_wc_my_account_menu_item', array(
244
+			$wp_customize->add_setting('lsx_wc_my_account_menu_item', array(
245 245
 				'default'           => false,
246
-				'sanitize_callback' => array( $this, 'sanitize_checkbox' ),
247
-			) );
246
+				'sanitize_callback' => array($this, 'sanitize_checkbox'),
247
+			));
248 248
 
249
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_my_account_menu_item', array(
250
-				'label'       => esc_html__( 'Menu Item', 'lsx-customizer' ),
251
-				'description' => esc_html__( 'Enable the My Account menu item.', 'lsx-customizer' ),
249
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_my_account_menu_item', array(
250
+				'label'       => esc_html__('Menu Item', 'lsx-customizer'),
251
+				'description' => esc_html__('Enable the My Account menu item.', 'lsx-customizer'),
252 252
 				'section'     => 'lsx-wc-my-account',
253 253
 				'settings'    => 'lsx_wc_my_account_menu_item',
254 254
 				'type'        => 'checkbox',
255 255
 				'priority'    => 1,
256
-			) ) );
256
+			)));
257 257
 
258
-			$wp_customize->add_setting( 'lsx_wc_my_account_menu_item_style', array(
258
+			$wp_customize->add_setting('lsx_wc_my_account_menu_item_style', array(
259 259
 				'default' => 'extended',
260
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
261
-			) );
260
+				'sanitize_callback' => array($this, 'sanitize_select'),
261
+			));
262 262
 
263
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_my_account_menu_item_style', array(
264
-				'label'       => esc_html__( 'Menu Item Style', 'lsx-customizer' ),
265
-				'description' => esc_html__( 'WooCommerce menu item My Account style.', 'lsx-customizer' ),
263
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_my_account_menu_item_style', array(
264
+				'label'       => esc_html__('Menu Item Style', 'lsx-customizer'),
265
+				'description' => esc_html__('WooCommerce menu item My Account style.', 'lsx-customizer'),
266 266
 				'section'     => 'lsx-wc-my-account',
267 267
 				'settings'    => 'lsx_wc_my_account_menu_item_style',
268 268
 				'type'        => 'select',
269 269
 				'priority'    => 2,
270 270
 				'choices'     => array(
271
-					'simple'   => esc_html__( 'Simple', 'lsx-customizer' ),
272
-					'extended' => esc_html__( 'Extended', 'lsx-customizer' ),
271
+					'simple'   => esc_html__('Simple', 'lsx-customizer'),
272
+					'extended' => esc_html__('Extended', 'lsx-customizer'),
273 273
 				),
274
-			) ) );
274
+			)));
275 275
 
276
-			$wp_customize->add_setting( 'lsx_wc_my_account_menu_item_position', array(
276
+			$wp_customize->add_setting('lsx_wc_my_account_menu_item_position', array(
277 277
 				'default' => 'main-menu-in',
278
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
279
-			) );
278
+				'sanitize_callback' => array($this, 'sanitize_select'),
279
+			));
280 280
 
281
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_my_account_menu_item_position', array(
282
-				'label'       => esc_html__( 'Menu Item Position', 'lsx-customizer' ),
283
-				'description' => esc_html__( 'WooCommerce menu item My Account position.', 'lsx-customizer' ),
281
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_my_account_menu_item_position', array(
282
+				'label'       => esc_html__('Menu Item Position', 'lsx-customizer'),
283
+				'description' => esc_html__('WooCommerce menu item My Account position.', 'lsx-customizer'),
284 284
 				'section'     => 'lsx-wc-my-account',
285 285
 				'settings'    => 'lsx_wc_my_account_menu_item_position',
286 286
 				'type'        => 'select',
287 287
 				'priority'    => 3,
288 288
 				'choices'     => array(
289
-					'main-menu-in'   => esc_html__( 'Main Menu (as last item)', 'lsx-customizer' ),
290
-					'main-menu-out'  => esc_html__( 'Main Menu (as last item, right aligned)', 'lsx-customizer' ),
291
-					'top-menu-left'  => esc_html__( 'Top Menu (left)', 'lsx-customizer' ),
292
-					'top-menu-right' => esc_html__( 'Top Menu (right)', 'lsx-customizer' ),
289
+					'main-menu-in'   => esc_html__('Main Menu (as last item)', 'lsx-customizer'),
290
+					'main-menu-out'  => esc_html__('Main Menu (as last item, right aligned)', 'lsx-customizer'),
291
+					'top-menu-left'  => esc_html__('Top Menu (left)', 'lsx-customizer'),
292
+					'top-menu-right' => esc_html__('Top Menu (right)', 'lsx-customizer'),
293 293
 				),
294
-			) ) );
294
+			)));
295 295
 		}
296 296
 
297 297
 		/**
@@ -299,23 +299,23 @@  discard block
 block discarded – undo
299 299
 		 *
300 300
 		 * @since 1.1.1
301 301
 		 */
302
-		public function body_class( $classes ) {
303
-			$distraction_free = get_theme_mod( 'lsx_distraction_free_checkout', false );
304
-			$two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
305
-			if ( is_checkout() ) {
306
-				$layout = get_theme_mod( 'lsx_wc_checkout_layout', 'default' );
302
+		public function body_class($classes) {
303
+			$distraction_free = get_theme_mod('lsx_distraction_free_checkout', false);
304
+			$two_step_checkout = get_theme_mod('lsx_two_step_checkout', false);
305
+			if (is_checkout()) {
306
+				$layout = get_theme_mod('lsx_wc_checkout_layout', 'default');
307 307
 
308
-				if ( 'default' === $layout ) {
308
+				if ('default' === $layout) {
309 309
 					$classes[] = 'lsx-wc-checkout-layout-default';
310
-				} elseif ( 'stacked' === $layout ) {
310
+				} elseif ('stacked' === $layout) {
311 311
 					$classes[] = 'lsx-wc-checkout-layout-stacked';
312
-				} elseif ( 'columns' === $layout ) {
312
+				} elseif ('columns' === $layout) {
313 313
 					$classes[] = 'lsx-wc-checkout-layout-two-column-addreses';
314 314
 				}
315
-				if ( ! empty( $distraction_free ) ) {
315
+				if ( ! empty($distraction_free)) {
316 316
 					$classes[] = 'lsx-wc-checkout-distraction-free';
317 317
 				}
318
-				if ( ! empty( $two_step_checkout ) ) {
318
+				if ( ! empty($two_step_checkout)) {
319 319
 					$classes[] = 'lsx-wc-checkout-two-steps';
320 320
 				}
321 321
 			}
@@ -331,15 +331,15 @@  discard block
 block discarded – undo
331 331
 		public function thankyou_page() {
332 332
 			global $wp;
333 333
 
334
-			if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) {
335
-				$thankyou_page = get_theme_mod( 'lsx_wc_checkout_thankyou_page', '0' );
334
+			if (is_checkout() && ! empty($wp->query_vars['order-received'])) {
335
+				$thankyou_page = get_theme_mod('lsx_wc_checkout_thankyou_page', '0');
336 336
 
337
-				if ( ! empty( $thankyou_page ) && ! is_page( $thankyou_page ) ) {
338
-					$order_id  = apply_filters( 'woocommerce_thankyou_order_id', absint( $wp->query_vars['order-received'] ) );
339
-					$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : wc_clean( $_GET['key'] ) );
337
+				if ( ! empty($thankyou_page) && ! is_page($thankyou_page)) {
338
+					$order_id  = apply_filters('woocommerce_thankyou_order_id', absint($wp->query_vars['order-received']));
339
+					$order_key = apply_filters('woocommerce_thankyou_order_key', empty($_GET['key']) ? '' : wc_clean($_GET['key']));
340 340
 
341
-					if ( $order_id > 0 ) {
342
-						wp_safe_redirect( get_permalink( $thankyou_page ) . '?order-received=' . $order_id . '&key=' . $order_key, 302 );
341
+					if ($order_id > 0) {
342
+						wp_safe_redirect(get_permalink($thankyou_page) . '?order-received=' . $order_id . '&key=' . $order_key, 302);
343 343
 						exit;
344 344
 					}
345 345
 				}
@@ -352,95 +352,95 @@  discard block
 block discarded – undo
352 352
 		 * @since 1.1.1
353 353
 		 */
354 354
 		public function checkout_steps() {
355
-			$cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url();
356
-			if ( ( is_checkout() || is_cart() ) && ! empty( get_theme_mod( 'lsx_checkout_steps', '1' ) ) ) :
355
+			$cart_url = function_exists('wc_get_cart_url') ? wc_get_cart_url() : WC()->cart->get_cart_url();
356
+			if ((is_checkout() || is_cart()) && ! empty(get_theme_mod('lsx_checkout_steps', '1'))) :
357 357
 				global $wp;
358 358
 				?>
359 359
 				<div class="lsx-wc-checkout-steps">
360 360
 					<ul class="lsx-wc-checkout-steps-items">
361 361
 
362
-						<?php if ( is_cart() ) : ?>
362
+						<?php if (is_cart()) : ?>
363 363
 
364 364
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done">
365
-								<a href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>" class="lsx-wc-checkout-steps-link">
365
+								<a href="<?php echo esc_url(get_permalink(wc_get_page_id('shop'))); ?>" class="lsx-wc-checkout-steps-link">
366 366
 									<i class="fa fa-check-circle" aria-hidden="true"></i>
367
-									<span><span><?php esc_html_e( 'Shop', 'lsx-customizer' ); ?></span></span>
367
+									<span><span><?php esc_html_e('Shop', 'lsx-customizer'); ?></span></span>
368 368
 								</a>
369 369
 
370 370
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
371 371
 							</li>
372 372
 
373 373
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-current lsx-wc-checkout-steps-item-cart">
374
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '2', 'lsx-customizer' ); ?></i>
375
-								<span><span><?php esc_html_e( 'My Cart', 'lsx-customizer' ); ?></span></span>
374
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('2', 'lsx-customizer'); ?></i>
375
+								<span><span><?php esc_html_e('My Cart', 'lsx-customizer'); ?></span></span>
376 376
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
377 377
 							</li>
378 378
 
379 379
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-disabled lsx-wc-checkout-steps-item-payment">
380
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '3', 'lsx-customizer' ); ?></i>
381
-								<span><span><?php esc_html_e( 'Billing details', 'lsx-customizer' ); ?></span></span>
380
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('3', 'lsx-customizer'); ?></i>
381
+								<span><span><?php esc_html_e('Billing details', 'lsx-customizer'); ?></span></span>
382 382
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
383 383
 							</li>
384 384
 
385 385
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-disabled lsx-wc-checkout-steps-item-thankyou">
386
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '4', 'lsx-customizer' ); ?></i>
387
-								<span><span><?php esc_html_e( 'Payment', 'lsx-customizer' ); ?></span></span>
386
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('4', 'lsx-customizer'); ?></i>
387
+								<span><span><?php esc_html_e('Payment', 'lsx-customizer'); ?></span></span>
388 388
 							</li>
389 389
 
390
-						<?php elseif ( is_checkout() && empty( $wp->query_vars['order-received'] ) ) : ?>
390
+						<?php elseif (is_checkout() && empty($wp->query_vars['order-received'])) : ?>
391 391
 
392 392
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done">
393
-								<a href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>" class="lsx-wc-checkout-steps-link">
393
+								<a href="<?php echo esc_url(get_permalink(wc_get_page_id('shop'))); ?>" class="lsx-wc-checkout-steps-link">
394 394
 									<i class="fa fa-check-circle" aria-hidden="true"></i>
395
-									<span><span><?php esc_html_e( 'Shop', 'lsx-customizer' ); ?></span></span>
395
+									<span><span><?php esc_html_e('Shop', 'lsx-customizer'); ?></span></span>
396 396
 								</a>
397 397
 
398 398
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
399 399
 							</li>
400 400
 
401 401
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-cart">
402
-								<a href="<?php echo esc_url( $cart_url ); ?>" class="lsx-wc-checkout-steps-link">
402
+								<a href="<?php echo esc_url($cart_url); ?>" class="lsx-wc-checkout-steps-link">
403 403
 									<i class="fa fa-check-circle" aria-hidden="true"></i>
404
-									<span><span><?php esc_html_e( 'My Cart', 'lsx-customizer' ); ?></span></span>
404
+									<span><span><?php esc_html_e('My Cart', 'lsx-customizer'); ?></span></span>
405 405
 								</a>
406 406
 
407 407
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
408 408
 							</li>
409 409
 
410 410
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-current lsx-wc-checkout-steps-item-payment">
411
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '3', 'lsx-customizer' ); ?></i>
412
-								<span><span><?php esc_html_e( 'Billing details', 'lsx-customizer' ); ?></span></span>
411
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('3', 'lsx-customizer'); ?></i>
412
+								<span><span><?php esc_html_e('Billing details', 'lsx-customizer'); ?></span></span>
413 413
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
414 414
 							</li>
415 415
 
416 416
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-disabled lsx-wc-checkout-steps-item-thankyou">
417
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '4', 'lsx-customizer' ); ?></i>
418
-								<span><span><?php esc_html_e( 'Payment', 'lsx-customizer' ); ?></span></span>
417
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('4', 'lsx-customizer'); ?></i>
418
+								<span><span><?php esc_html_e('Payment', 'lsx-customizer'); ?></span></span>
419 419
 							</li>
420 420
 
421
-						<?php elseif ( is_checkout() ) : ?>
421
+						<?php elseif (is_checkout()) : ?>
422 422
 
423 423
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done">
424 424
 								<i class="fa fa-check-circle" aria-hidden="true"></i>
425
-								<span><span><?php esc_html_e( 'Shop', 'lsx-customizer' ); ?></span></span>
425
+								<span><span><?php esc_html_e('Shop', 'lsx-customizer'); ?></span></span>
426 426
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
427 427
 							</li>
428 428
 
429 429
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-cart">
430 430
 								<i class="fa fa-check-circle" aria-hidden="true"></i>
431
-								<span><span><?php esc_html_e( 'My Cart', 'lsx-customizer' ); ?></span></span>
431
+								<span><span><?php esc_html_e('My Cart', 'lsx-customizer'); ?></span></span>
432 432
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
433 433
 							</li>
434 434
 
435 435
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-payment">
436 436
 								<i class="fa fa-check-circle" aria-hidden="true"></i>
437
-								<span><span><?php esc_html_e( 'Billing details', 'lsx-customizer' ); ?></span></span>
437
+								<span><span><?php esc_html_e('Billing details', 'lsx-customizer'); ?></span></span>
438 438
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
439 439
 							</li>
440 440
 
441 441
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-current lsx-wc-checkout-steps-item-thankyou">
442
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '4', 'lsx-customizer' ); ?></i>
443
-								<span><span><?php esc_html_e( 'Payment', 'lsx-customizer' ); ?></span></span>
442
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('4', 'lsx-customizer'); ?></i>
443
+								<span><span><?php esc_html_e('Payment', 'lsx-customizer'); ?></span></span>
444 444
 							</li>
445 445
 
446 446
 						<?php endif; ?>
@@ -457,11 +457,11 @@  discard block
 block discarded – undo
457 457
 		 * @since 1.1.1
458 458
 		 */
459 459
 		public function checkout_extra_html() {
460
-			if ( is_checkout() ) {
461
-				$checkout_extra_html = get_theme_mod( 'lsx_wc_checkout_extra_html', '' );
460
+			if (is_checkout()) {
461
+				$checkout_extra_html = get_theme_mod('lsx_wc_checkout_extra_html', '');
462 462
 
463
-				if ( ! empty( $checkout_extra_html ) ) {
464
-					add_action( 'woocommerce_review_order_after_payment', array( $this, 'checkout_extra_html_echo' ), 9 );
463
+				if ( ! empty($checkout_extra_html)) {
464
+					add_action('woocommerce_review_order_after_payment', array($this, 'checkout_extra_html_echo'), 9);
465 465
 				}
466 466
 			}
467 467
 		}
@@ -472,13 +472,13 @@  discard block
 block discarded – undo
472 472
 		 * @since 1.1.1
473 473
 		 */
474 474
 		public function checkout_extra_html_echo() {
475
-			if ( is_checkout() ) {
476
-				$checkout_extra_html = get_theme_mod( 'lsx_wc_checkout_extra_html', '' );
475
+			if (is_checkout()) {
476
+				$checkout_extra_html = get_theme_mod('lsx_wc_checkout_extra_html', '');
477 477
 
478
-				if ( ! empty( $checkout_extra_html ) ) {
478
+				if ( ! empty($checkout_extra_html)) {
479 479
 					?>
480 480
 					<div class="lsx-wc-checkout-extra-html">
481
-						<?php echo wp_kses_post( $checkout_extra_html ); ?>
481
+						<?php echo wp_kses_post($checkout_extra_html); ?>
482 482
 					</div>
483 483
 				<?php
484 484
 				}
@@ -491,12 +491,12 @@  discard block
 block discarded – undo
491 491
 		 * @since 1.1.1
492 492
 		 */
493 493
 		public function cart_extra_html() {
494
-			if ( is_cart() ) {
495
-				$cart_extra_html = get_theme_mod( 'lsx_wc_cart_extra_html', '' );
494
+			if (is_cart()) {
495
+				$cart_extra_html = get_theme_mod('lsx_wc_cart_extra_html', '');
496 496
 
497
-				if ( ! empty( $cart_extra_html ) ) {
498
-					remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
499
-					add_action( 'woocommerce_cart_collaterals', array( $this, 'cart_extra_html_echo' ), 9 );
497
+				if ( ! empty($cart_extra_html)) {
498
+					remove_action('woocommerce_cart_collaterals', 'woocommerce_cross_sell_display');
499
+					add_action('woocommerce_cart_collaterals', array($this, 'cart_extra_html_echo'), 9);
500 500
 				}
501 501
 			}
502 502
 		}
@@ -507,12 +507,12 @@  discard block
 block discarded – undo
507 507
 		 * @since 1.1.1
508 508
 		 */
509 509
 		public function cart_extra_html_echo() {
510
-			if ( is_cart() ) {
511
-				$cart_extra_html = get_theme_mod( 'lsx_wc_cart_extra_html', '' );
510
+			if (is_cart()) {
511
+				$cart_extra_html = get_theme_mod('lsx_wc_cart_extra_html', '');
512 512
 
513
-				if ( ! empty( $cart_extra_html ) ) { ?>
513
+				if ( ! empty($cart_extra_html)) { ?>
514 514
 					<div class="lsx-wc-cart-extra-html">
515
-						<?php echo wp_kses_post( $cart_extra_html ); ?>
515
+						<?php echo wp_kses_post($cart_extra_html); ?>
516 516
 					</div>
517 517
 				<?php }
518 518
 			}
@@ -523,11 +523,11 @@  discard block
 block discarded – undo
523 523
 		 *
524 524
 		 * @since 1.1.1
525 525
 		 */
526
-		public function cart_menu_item_position( $menu_position ) {
527
-			$position = get_theme_mod( 'lsx_wc_cart_menu_item_position', '' );
526
+		public function cart_menu_item_position($menu_position) {
527
+			$position = get_theme_mod('lsx_wc_cart_menu_item_position', '');
528 528
 
529
-			if ( ! empty( $position ) ) {
530
-				switch ( $position ) {
529
+			if ( ! empty($position)) {
530
+				switch ($position) {
531 531
 					case 'main-menu-in':
532 532
 					case 'main-menu-out':
533 533
 						$menu_position = 'primary';
@@ -551,16 +551,16 @@  discard block
 block discarded – undo
551 551
 		 *
552 552
 		 * @since 1.1.1
553 553
 		 */
554
-		public function cart_menu_item_class( $item_class ) {
555
-			$position = get_theme_mod( 'lsx_wc_cart_menu_item_position', '' );
554
+		public function cart_menu_item_class($item_class) {
555
+			$position = get_theme_mod('lsx_wc_cart_menu_item_position', '');
556 556
 
557
-			if ( 'main-menu-out' === $position ) {
557
+			if ('main-menu-out' === $position) {
558 558
 				$item_class .= ' lsx-wc-cart-menu-item-right-aligned';
559 559
 			}
560 560
 
561
-			$style = get_theme_mod( 'lsx_wc_cart_menu_item_style', '' );
561
+			$style = get_theme_mod('lsx_wc_cart_menu_item_style', '');
562 562
 
563
-			if ( 'simple' === $style ) {
563
+			if ('simple' === $style) {
564 564
 				$item_class .= ' lsx-wc-cart-menu-item-simple';
565 565
 			}
566 566
 
@@ -572,47 +572,47 @@  discard block
 block discarded – undo
572 572
 		 *
573 573
 		 * @since 1.1.1
574 574
 		 */
575
-		public function my_account_menu_item( $items, $args ) {
576
-			$my_account_menu_item_position = apply_filters( 'lsx_wc_my_account_menu_item_position', 'primary' );
575
+		public function my_account_menu_item($items, $args) {
576
+			$my_account_menu_item_position = apply_filters('lsx_wc_my_account_menu_item_position', 'primary');
577 577
 
578
-			if ( $my_account_menu_item_position === $args->theme_location || ( 'primary_logged_out' === $args->theme_location && 'primary' === $my_account_menu_item_position ) ) {
579
-				$customizer_option  = get_theme_mod( 'lsx_wc_my_account_menu_item', false );
578
+			if ($my_account_menu_item_position === $args->theme_location || ('primary_logged_out' === $args->theme_location && 'primary' === $my_account_menu_item_position)) {
579
+				$customizer_option = get_theme_mod('lsx_wc_my_account_menu_item', false);
580 580
 
581
-				if ( ! empty( $customizer_option ) ) {
582
-					if ( is_account_page() ) {
581
+				if ( ! empty($customizer_option)) {
582
+					if (is_account_page()) {
583 583
 						$class = 'current-menu-item';
584 584
 					} else {
585 585
 						$class = '';
586 586
 					}
587 587
 
588 588
 					$item_class = 'menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children dropdown lsx-wc-my-account-menu-item ' . $class;
589
-					$item_class = apply_filters( 'lsx_wc_my_account_menu_item_class', $item_class );
589
+					$item_class = apply_filters('lsx_wc_my_account_menu_item_class', $item_class);
590 590
 
591 591
 					$endpoints = WC()->query->get_query_vars();
592 592
 
593
-					if ( is_user_logged_in() ) {
593
+					if (is_user_logged_in()) {
594 594
 						$item  = '<li class="' . $item_class . '">';
595
-						$item .= '<a title="' . esc_attr__( 'View your account', 'lsx-customizer' ) . '" href="' . esc_url( get_permalink( wc_get_page_id( 'myaccount' ) ) ) . '" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true"><span>' . esc_attr__( 'My Account', 'lsx-customizer' ) . '</span></a>';
595
+						$item .= '<a title="' . esc_attr__('View your account', 'lsx-customizer') . '" href="' . esc_url(get_permalink(wc_get_page_id('myaccount'))) . '" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true"><span>' . esc_attr__('My Account', 'lsx-customizer') . '</span></a>';
596 596
 						$item .= '<ul role="menu" class=" dropdown-menu lsx-wc-my-account-sub-menu">';
597
-							foreach ( wc_get_account_menu_items() as $endpoint => $label ) {
597
+							foreach (wc_get_account_menu_items() as $endpoint => $label) {
598 598
 								$slug = $endpoint;
599
-								if ( isset( $endpoints[ $endpoint ] ) && '' !== $endpoints[ $endpoint ] ) {
600
-									$slug = $endpoints[ $endpoint ];
599
+								if (isset($endpoints[$endpoint]) && '' !== $endpoints[$endpoint]) {
600
+									$slug = $endpoints[$endpoint];
601 601
 								}
602
-								if ( 'dashboard' === $slug ) {
602
+								if ('dashboard' === $slug) {
603 603
 									$slug = '';
604 604
 								}
605
-								$item .= '<li class="menu-item"><a title="" href="' . esc_url( get_permalink( wc_get_page_id( 'myaccount' ) ) . $slug ) . '">' . $label . '</a></li>';
605
+								$item .= '<li class="menu-item"><a title="" href="' . esc_url(get_permalink(wc_get_page_id('myaccount')) . $slug) . '">' . $label . '</a></li>';
606 606
 							}
607 607
 						$item .= '</ul></li>';
608 608
 
609 609
 					} else {
610 610
 						$item = '<li class="' . $item_class . '">' .
611
-									'<a title="' . esc_attr__( 'View your account', 'lsx-customizer' ) . '" href="' . esc_url( get_permalink( wc_get_page_id( 'myaccount' ) ) ) . '"><span>' . esc_attr__( 'Login', 'lsx-customizer' ) . '</span></a>' .
611
+									'<a title="' . esc_attr__('View your account', 'lsx-customizer') . '" href="' . esc_url(get_permalink(wc_get_page_id('myaccount'))) . '"><span>' . esc_attr__('Login', 'lsx-customizer') . '</span></a>' .
612 612
 								'</li>';
613 613
 					}
614 614
 
615
-					if ( 'top-menu' === $args->theme_location ) {
615
+					if ('top-menu' === $args->theme_location) {
616 616
 						$items = $item . $items;
617 617
 					} else {
618 618
 						$items = $items . $item;
@@ -628,11 +628,11 @@  discard block
 block discarded – undo
628 628
 		 *
629 629
 		 * @since 1.1.1
630 630
 		 */
631
-		public function my_account_menu_item_position( $menu_position ) {
632
-			$position = get_theme_mod( 'lsx_wc_my_account_menu_item_position', '' );
631
+		public function my_account_menu_item_position($menu_position) {
632
+			$position = get_theme_mod('lsx_wc_my_account_menu_item_position', '');
633 633
 
634
-			if ( ! empty( $position ) ) {
635
-				switch ( $position ) {
634
+			if ( ! empty($position)) {
635
+				switch ($position) {
636 636
 					case 'main-menu-in':
637 637
 					case 'main-menu-out':
638 638
 						$menu_position = 'primary';
@@ -656,20 +656,20 @@  discard block
 block discarded – undo
656 656
 		 *
657 657
 		 * @since 1.1.1
658 658
 		 */
659
-		public function my_account_menu_item_class( $item_class ) {
660
-			$position = get_theme_mod( 'lsx_wc_my_account_menu_item_position', '' );
659
+		public function my_account_menu_item_class($item_class) {
660
+			$position = get_theme_mod('lsx_wc_my_account_menu_item_position', '');
661 661
 
662
-			if ( 'main-menu-out' === $position ) {
662
+			if ('main-menu-out' === $position) {
663 663
 				$item_class .= ' lsx-wc-my-account-menu-item-right-aligned';
664 664
 			}
665 665
 
666
-			if ( ! is_user_logged_in() ) {
666
+			if ( ! is_user_logged_in()) {
667 667
 				$item_class .= ' lsx-wc-my-account-login';
668 668
 			}
669 669
 
670
-			$style = get_theme_mod( 'lsx_wc_my_account_menu_item_style', '' );
670
+			$style = get_theme_mod('lsx_wc_my_account_menu_item_style', '');
671 671
 
672
-			if ( 'simple' === $style ) {
672
+			if ('simple' === $style) {
673 673
 				$item_class .= ' lsx-wc-my-account-menu-item-simple';
674 674
 			}
675 675
 
Please login to merge, or discard this patch.
classes/class-lsx-customizer-colour-body.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! class_exists( 'LSX_Customizer_Colour_Body' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Body')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Body Class
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 		 * @since 1.0.0
19 19
 		 */
20 20
 		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
21
+			add_action('after_switch_theme', array($this, 'set_theme_mod'));
22
+			add_action('customize_save_after', array($this, 'set_theme_mod'));
23 23
 
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
24
+			add_action('wp_enqueue_scripts', array($this, 'enqueue_css'), 2999);
25 25
 		}
26 26
 
27 27
 		/**
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 		 */
32 32
 		public function set_theme_mod() {
33 33
 			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
34
+			$styles     = $this->get_css($theme_mods);
35 35
 
36
-			set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__body_theme_mod', $styles);
37 37
 		}
38 38
 
39 39
 		/**
@@ -42,20 +42,20 @@  discard block
 block discarded – undo
42 42
 		 * @since 1.0.0
43 43
 		 */
44 44
 		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__body_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__body_theme_mod');
46 46
 
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
47
+			if (is_customize_preview() || false === $styles_from_theme_mod) {
48 48
 				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
49
+				$styles     = $this->get_css($theme_mods);
50 50
 
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__body_theme_mod', $styles);
53 53
 				}
54 54
 			} else {
55 55
 				$styles = $styles_from_theme_mod;
56 56
 			}
57 57
 
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
58
+			wp_add_inline_style('lsx-customizer', $styles);
59 59
 		}
60 60
 
61 61
 		/**
@@ -66,29 +66,29 @@  discard block
 block discarded – undo
66 66
 		public function get_theme_mods() {
67 67
 			$colors = parent::get_color_scheme();
68 68
 
69
-			$background_color = get_theme_mod( 'background_color', $colors['background_color'] );
69
+			$background_color = get_theme_mod('background_color', $colors['background_color']);
70 70
 
71
-			if ( '#' !== substr( $background_color, 0, 1 ) ) {
71
+			if ('#' !== substr($background_color, 0, 1)) {
72 72
 				$background_color = '#' . $background_color;
73 73
 			}
74 74
 
75
-			return apply_filters( 'lsx_customizer_colours_body', array(
75
+			return apply_filters('lsx_customizer_colours_body', array(
76 76
 				'background_color'                       => $background_color,
77
-				'body_line_color'                        => get_theme_mod( 'body_line_color',                        $colors['body_line_color'] ),
78
-				'body_text_heading_color'                => get_theme_mod( 'body_text_heading_color',                $colors['body_text_heading_color'] ),
79
-				'body_text_small_color'                  => get_theme_mod( 'body_text_small_color',                  $colors['body_text_small_color'] ),
80
-				'body_text_color'                        => get_theme_mod( 'body_text_color',                        $colors['body_text_color'] ),
81
-				'body_link_color'                        => get_theme_mod( 'body_link_color',                        $colors['body_link_color'] ),
82
-				'body_link_hover_color'                  => get_theme_mod( 'body_link_hover_color',                  $colors['body_link_hover_color'] ),
83
-				'body_section_full_background_color'     => get_theme_mod( 'body_section_full_background_color',     $colors['body_section_full_background_color'] ),
84
-				'body_section_full_text_color'           => get_theme_mod( 'body_section_full_text_color',           $colors['body_section_full_text_color'] ),
85
-				'body_section_full_link_color'           => get_theme_mod( 'body_section_full_link_color',           $colors['body_section_full_link_color'] ),
86
-				'body_section_full_link_hover_color'     => get_theme_mod( 'body_section_full_link_hover_color',     $colors['body_section_full_link_hover_color'] ),
87
-				'body_section_full_cta_background_color' => get_theme_mod( 'body_section_full_cta_background_color', $colors['body_section_full_cta_background_color'] ),
88
-				'body_section_full_cta_text_color'       => get_theme_mod( 'body_section_full_cta_text_color',       $colors['body_section_full_cta_text_color'] ),
89
-				'body_section_full_cta_link_color'       => get_theme_mod( 'body_section_full_cta_link_color',       $colors['body_section_full_cta_link_color'] ),
90
-				'body_section_full_cta_link_hover_color' => get_theme_mod( 'body_section_full_cta_link_hover_color', $colors['body_section_full_cta_link_hover_color'] ),
91
-			) );
77
+				'body_line_color'                        => get_theme_mod('body_line_color', $colors['body_line_color']),
78
+				'body_text_heading_color'                => get_theme_mod('body_text_heading_color', $colors['body_text_heading_color']),
79
+				'body_text_small_color'                  => get_theme_mod('body_text_small_color', $colors['body_text_small_color']),
80
+				'body_text_color'                        => get_theme_mod('body_text_color', $colors['body_text_color']),
81
+				'body_link_color'                        => get_theme_mod('body_link_color', $colors['body_link_color']),
82
+				'body_link_hover_color'                  => get_theme_mod('body_link_hover_color', $colors['body_link_hover_color']),
83
+				'body_section_full_background_color'     => get_theme_mod('body_section_full_background_color', $colors['body_section_full_background_color']),
84
+				'body_section_full_text_color'           => get_theme_mod('body_section_full_text_color', $colors['body_section_full_text_color']),
85
+				'body_section_full_link_color'           => get_theme_mod('body_section_full_link_color', $colors['body_section_full_link_color']),
86
+				'body_section_full_link_hover_color'     => get_theme_mod('body_section_full_link_hover_color', $colors['body_section_full_link_hover_color']),
87
+				'body_section_full_cta_background_color' => get_theme_mod('body_section_full_cta_background_color', $colors['body_section_full_cta_background_color']),
88
+				'body_section_full_cta_text_color'       => get_theme_mod('body_section_full_cta_text_color', $colors['body_section_full_cta_text_color']),
89
+				'body_section_full_cta_link_color'       => get_theme_mod('body_section_full_cta_link_color', $colors['body_section_full_cta_link_color']),
90
+				'body_section_full_cta_link_hover_color' => get_theme_mod('body_section_full_cta_link_hover_color', $colors['body_section_full_cta_link_hover_color']),
91
+			));
92 92
 		}
93 93
 
94 94
 		/**
@@ -96,32 +96,32 @@  discard block
 block discarded – undo
96 96
 		 *
97 97
 		 * @since 1.0.0
98 98
 		 */
99
-		function get_css( $colors ) {
99
+		function get_css($colors) {
100 100
 			global $customizer_colour_names;
101 101
 
102 102
 			$colors_template = array();
103 103
 
104
-			foreach ( $customizer_colour_names as $key => $value ) {
105
-				$colors_template[ $key ] = '';
104
+			foreach ($customizer_colour_names as $key => $value) {
105
+				$colors_template[$key] = '';
106 106
 			}
107 107
 
108
-			$colors = wp_parse_args( $colors, $colors_template );
109
-
110
-			if ( empty( $colors['background_color'] )
111
-				|| empty( $colors['body_line_color'] )
112
-				|| empty( $colors['body_text_heading_color'] )
113
-				|| empty( $colors['body_text_color'] )
114
-				|| empty( $colors['body_link_color'] )
115
-				|| empty( $colors['body_link_hover_color'] )
116
-				|| empty( $colors['body_text_small_color'] )
117
-				|| empty( $colors['body_section_full_background_color'] )
118
-				|| empty( $colors['body_section_full_text_color'] )
119
-				|| empty( $colors['body_section_full_link_color'] )
120
-				|| empty( $colors['body_section_full_link_hover_color'] )
121
-				|| empty( $colors['body_section_full_cta_background_color'] )
122
-				|| empty( $colors['body_section_full_cta_text_color'] )
123
-				|| empty( $colors['body_section_full_cta_link_color'] )
124
-				|| empty( $colors['body_section_full_cta_link_hover_color'] ) ) {
108
+			$colors = wp_parse_args($colors, $colors_template);
109
+
110
+			if (empty($colors['background_color'])
111
+				|| empty($colors['body_line_color'])
112
+				|| empty($colors['body_text_heading_color'])
113
+				|| empty($colors['body_text_color'])
114
+				|| empty($colors['body_link_color'])
115
+				|| empty($colors['body_link_hover_color'])
116
+				|| empty($colors['body_text_small_color'])
117
+				|| empty($colors['body_section_full_background_color'])
118
+				|| empty($colors['body_section_full_text_color'])
119
+				|| empty($colors['body_section_full_link_color'])
120
+				|| empty($colors['body_section_full_link_hover_color'])
121
+				|| empty($colors['body_section_full_cta_background_color'])
122
+				|| empty($colors['body_section_full_cta_text_color'])
123
+				|| empty($colors['body_section_full_cta_link_color'])
124
+				|| empty($colors['body_section_full_cta_link_hover_color'])) {
125 125
 				return '';
126 126
 			}
127 127
 
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 				);
151 151
 			';
152 152
 
153
-			$css = apply_filters( 'lsx_customizer_colour_selectors_body', $css, $colors );
154
-			$css = parent::scss_to_css( $css );
153
+			$css = apply_filters('lsx_customizer_colour_selectors_body', $css, $colors);
154
+			$css = parent::scss_to_css($css);
155 155
 
156 156
 			return $css;
157 157
 		}
Please login to merge, or discard this patch.