Passed
Push — master ( 67c376...d74a15 )
by Chris
05:01
created
includes/lsx-customizer-colour-options.php 1 patch
Spacing   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -12,97 +12,97 @@  discard block
 block discarded – undo
12 12
 global $customizer_colour_names;
13 13
 global $customizer_colour_choices;
14 14
 
15
-$customizer_colour_names = apply_filters( 'lsx_customizer_colour_names', array(
16
-	'button_background_color'       => esc_html__( 'Background', 'lsx-customizer' ),
17
-	'button_background_hover_color' => esc_html__( 'Background (hover)', 'lsx-customizer' ),
18
-	'button_text_color'             => esc_html__( 'Text', 'lsx-customizer' ),
19
-	'button_text_color_hover'       => esc_html__( 'Text (hover)', 'lsx-customizer' ),
20
-	'button_shadow'                 => esc_html__( 'Shadow', 'lsx-customizer' ),
21
-
22
-	'button_cta_background_color'       => esc_html__( 'Background', 'lsx-customizer' ),
23
-	'button_cta_background_hover_color' => esc_html__( 'Background (hover)', 'lsx-customizer' ),
24
-	'button_cta_text_color'             => esc_html__( 'Text', 'lsx-customizer' ),
25
-	'button_cta_text_color_hover'       => esc_html__( 'Text (hover)', 'lsx-customizer' ),
26
-	'button_cta_shadow'                 => esc_html__( 'Shadow', 'lsx-customizer' ),
27
-
28
-	'button_secondary_background_color'       => esc_html__( 'Background', 'lsx-customizer' ),
29
-	'button_secondary_background_hover_color' => esc_html__( 'Background (hover)', 'lsx-customizer' ),
30
-	'button_secondary_text_color'             => esc_html__( 'Text', 'lsx-customizer' ),
31
-	'button_secondary_text_color_hover'       => esc_html__( 'Text (hover)', 'lsx-customizer' ),
32
-	'button_secondary_shadow'                 => esc_html__( 'Shadow', 'lsx-customizer' ),
33
-
34
-	'button_tertiary_background_color'       => esc_html__( 'Background', 'lsx-customizer' ),
35
-	'button_tertiary_background_hover_color' => esc_html__( 'Background (hover)', 'lsx-customizer' ),
36
-	'button_tertiary_text_color'             => esc_html__( 'Text', 'lsx-customizer' ),
37
-	'button_tertiary_text_color_hover'       => esc_html__( 'Text (hover)', 'lsx-customizer' ),
38
-	'button_tertiary_shadow'                 => esc_html__( 'Shadow', 'lsx-customizer' ),
39
-
40
-	'top_menu_background_color'          => esc_html__( 'Background', 'lsx-customizer' ),
41
-	'top_menu_link_color'                => esc_html__( 'Link', 'lsx-customizer' ),
42
-	'top_menu_link_hover_color'          => esc_html__( 'Link (hover)', 'lsx-customizer' ),
43
-	'top_menu_icon_color'                => esc_html__( 'Icon', 'lsx-customizer' ),
44
-	'top_menu_icon_hover_color'          => esc_html__( 'Icon (hover)', 'lsx-customizer' ),
45
-	'top_menu_dropdown_color'            => esc_html__( 'Dropdown', 'lsx-customizer' ),
46
-	'top_menu_dropdown_hover_color'      => esc_html__( 'Dropdown (hover)', 'lsx-customizer' ),
47
-	'top_menu_dropdown_link_color'       => esc_html__( 'Dropdown link', 'lsx-customizer' ),
48
-	'top_menu_dropdown_link_hover_color' => esc_html__( 'Dropdown link (hover)', 'lsx-customizer' ),
49
-
50
-	'header_background_color'  => esc_html__( 'Background', 'lsx-customizer' ),
51
-	'header_link_color'        => esc_html__( 'Link', 'lsx-customizer' ),
52
-	'header_link_hover_color'  => esc_html__( 'Link (hover)', 'lsx-customizer' ),
53
-	'header_description_color' => esc_html__( 'Description', 'lsx-customizer' ),
54
-
55
-	'main_menu_background_color'                => esc_html__( 'Background', 'lsx-customizer' ),
56
-	'main_menu_link_color'                      => esc_html__( 'Link', 'lsx-customizer' ),
57
-	'main_menu_link_hover_color'                => esc_html__( 'Link (hover)', 'lsx-customizer' ),
58
-	'main_menu_dropdown_background_color'       => esc_html__( 'Dropdown', 'lsx-customizer' ),
59
-	'main_menu_dropdown_background_hover_color' => esc_html__( 'Dropdown (hover)', 'lsx-customizer' ),
60
-	'main_menu_dropdown_link_color'             => esc_html__( 'Dropdown link', 'lsx-customizer' ),
61
-	'main_menu_dropdown_link_hover_color'       => esc_html__( 'Dropdown link (hover)', 'lsx-customizer' ),
62
-
63
-	'banner_background_color'               => esc_html__( 'Background', 'lsx-customizer' ),
64
-	'banner_text_color'                     => esc_html__( 'Text', 'lsx-customizer' ),
65
-	'banner_text_image_color'               => esc_html__( 'Text (over image)', 'lsx-customizer' ),
66
-	'banner_breadcrumb_background_color'    => esc_html__( 'Breadcrumb Background', 'lsx-customizer' ),
67
-	'banner_breadcrumb_text_color'          => esc_html__( 'Breadcrumb Text', 'lsx-customizer' ),
68
-	'banner_breadcrumb_text_selected_color' => esc_html__( 'Breadcrumb Text (selected)', 'lsx-customizer' ),
69
-
70
-	'background_color'                       => esc_html__( 'Background', 'lsx-customizer' ),
71
-	'body_line_color'                        => esc_html__( 'Line', 'lsx-customizer' ),
72
-	'body_text_heading_color'                => esc_html__( 'Text (heading)', 'lsx-customizer' ),
73
-	'body_text_small_color'                  => esc_html__( 'Text (small)', 'lsx-customizer' ),
74
-	'body_text_color'                        => esc_html__( 'Text', 'lsx-customizer' ),
75
-	'body_link_color'                        => esc_html__( 'Link', 'lsx-customizer' ),
76
-	'body_link_hover_color'                  => esc_html__( 'Link (hover)', 'lsx-customizer' ),
77
-	'body_section_full_background_color'     => esc_html__( 'Section full (background)', 'lsx-customizer' ),
78
-	'body_section_full_text_color'           => esc_html__( 'Section full (text)', 'lsx-customizer' ),
79
-	'body_section_full_link_color'           => esc_html__( 'Section full (link)', 'lsx-customizer' ),
80
-	'body_section_full_link_hover_color'     => esc_html__( 'Section full (link hover)', 'lsx-customizer' ),
81
-	'body_section_full_cta_background_color' => esc_html__( 'Section full CTA (background)', 'lsx-customizer' ),
82
-	'body_section_full_cta_text_color'       => esc_html__( 'Section full CTA (text)', 'lsx-customizer' ),
83
-	'body_section_full_cta_link_color'       => esc_html__( 'Section full CTA (link)', 'lsx-customizer' ),
84
-	'body_section_full_cta_link_hover_color' => esc_html__( 'Section full CTA (link hover)', 'lsx-customizer' ),
85
-
86
-	'footer_cta_background_color' => esc_html__( 'Background', 'lsx-customizer' ),
87
-	'footer_cta_text_color'       => esc_html__( 'Text', 'lsx-customizer' ),
88
-	'footer_cta_link_color'       => esc_html__( 'Link', 'lsx-customizer' ),
89
-	'footer_cta_link_hover_color' => esc_html__( 'Link (hover)', 'lsx-customizer' ),
90
-
91
-	'footer_widgets_background_color' => esc_html__( 'Background', 'lsx-customizer' ),
92
-	'footer_widgets_text_color'       => esc_html__( 'Text', 'lsx-customizer' ),
93
-	'footer_widgets_link_color'       => esc_html__( 'Link', 'lsx-customizer' ),
94
-	'footer_widgets_link_hover_color' => esc_html__( 'Link (hover)', 'lsx-customizer' ),
95
-
96
-	'footer_background_color' => esc_html__( 'Background', 'lsx-customizer' ),
97
-	'footer_text_color'       => esc_html__( 'Text', 'lsx-customizer' ),
98
-	'footer_link_color'       => esc_html__( 'Link', 'lsx-customizer' ),
99
-	'footer_link_hover_color' => esc_html__( 'Link (hover)', 'lsx-customizer' ),
100
-) );
101
-
102
-$customizer_colour_choices = apply_filters( 'lsx_customizer_colour_choices', array(
15
+$customizer_colour_names = apply_filters('lsx_customizer_colour_names', array(
16
+	'button_background_color'       => esc_html__('Background', 'lsx-customizer'),
17
+	'button_background_hover_color' => esc_html__('Background (hover)', 'lsx-customizer'),
18
+	'button_text_color'             => esc_html__('Text', 'lsx-customizer'),
19
+	'button_text_color_hover'       => esc_html__('Text (hover)', 'lsx-customizer'),
20
+	'button_shadow'                 => esc_html__('Shadow', 'lsx-customizer'),
21
+
22
+	'button_cta_background_color'       => esc_html__('Background', 'lsx-customizer'),
23
+	'button_cta_background_hover_color' => esc_html__('Background (hover)', 'lsx-customizer'),
24
+	'button_cta_text_color'             => esc_html__('Text', 'lsx-customizer'),
25
+	'button_cta_text_color_hover'       => esc_html__('Text (hover)', 'lsx-customizer'),
26
+	'button_cta_shadow'                 => esc_html__('Shadow', 'lsx-customizer'),
27
+
28
+	'button_secondary_background_color'       => esc_html__('Background', 'lsx-customizer'),
29
+	'button_secondary_background_hover_color' => esc_html__('Background (hover)', 'lsx-customizer'),
30
+	'button_secondary_text_color'             => esc_html__('Text', 'lsx-customizer'),
31
+	'button_secondary_text_color_hover'       => esc_html__('Text (hover)', 'lsx-customizer'),
32
+	'button_secondary_shadow'                 => esc_html__('Shadow', 'lsx-customizer'),
33
+
34
+	'button_tertiary_background_color'       => esc_html__('Background', 'lsx-customizer'),
35
+	'button_tertiary_background_hover_color' => esc_html__('Background (hover)', 'lsx-customizer'),
36
+	'button_tertiary_text_color'             => esc_html__('Text', 'lsx-customizer'),
37
+	'button_tertiary_text_color_hover'       => esc_html__('Text (hover)', 'lsx-customizer'),
38
+	'button_tertiary_shadow'                 => esc_html__('Shadow', 'lsx-customizer'),
39
+
40
+	'top_menu_background_color'          => esc_html__('Background', 'lsx-customizer'),
41
+	'top_menu_link_color'                => esc_html__('Link', 'lsx-customizer'),
42
+	'top_menu_link_hover_color'          => esc_html__('Link (hover)', 'lsx-customizer'),
43
+	'top_menu_icon_color'                => esc_html__('Icon', 'lsx-customizer'),
44
+	'top_menu_icon_hover_color'          => esc_html__('Icon (hover)', 'lsx-customizer'),
45
+	'top_menu_dropdown_color'            => esc_html__('Dropdown', 'lsx-customizer'),
46
+	'top_menu_dropdown_hover_color'      => esc_html__('Dropdown (hover)', 'lsx-customizer'),
47
+	'top_menu_dropdown_link_color'       => esc_html__('Dropdown link', 'lsx-customizer'),
48
+	'top_menu_dropdown_link_hover_color' => esc_html__('Dropdown link (hover)', 'lsx-customizer'),
49
+
50
+	'header_background_color'  => esc_html__('Background', 'lsx-customizer'),
51
+	'header_link_color'        => esc_html__('Link', 'lsx-customizer'),
52
+	'header_link_hover_color'  => esc_html__('Link (hover)', 'lsx-customizer'),
53
+	'header_description_color' => esc_html__('Description', 'lsx-customizer'),
54
+
55
+	'main_menu_background_color'                => esc_html__('Background', 'lsx-customizer'),
56
+	'main_menu_link_color'                      => esc_html__('Link', 'lsx-customizer'),
57
+	'main_menu_link_hover_color'                => esc_html__('Link (hover)', 'lsx-customizer'),
58
+	'main_menu_dropdown_background_color'       => esc_html__('Dropdown', 'lsx-customizer'),
59
+	'main_menu_dropdown_background_hover_color' => esc_html__('Dropdown (hover)', 'lsx-customizer'),
60
+	'main_menu_dropdown_link_color'             => esc_html__('Dropdown link', 'lsx-customizer'),
61
+	'main_menu_dropdown_link_hover_color'       => esc_html__('Dropdown link (hover)', 'lsx-customizer'),
62
+
63
+	'banner_background_color'               => esc_html__('Background', 'lsx-customizer'),
64
+	'banner_text_color'                     => esc_html__('Text', 'lsx-customizer'),
65
+	'banner_text_image_color'               => esc_html__('Text (over image)', 'lsx-customizer'),
66
+	'banner_breadcrumb_background_color'    => esc_html__('Breadcrumb Background', 'lsx-customizer'),
67
+	'banner_breadcrumb_text_color'          => esc_html__('Breadcrumb Text', 'lsx-customizer'),
68
+	'banner_breadcrumb_text_selected_color' => esc_html__('Breadcrumb Text (selected)', 'lsx-customizer'),
69
+
70
+	'background_color'                       => esc_html__('Background', 'lsx-customizer'),
71
+	'body_line_color'                        => esc_html__('Line', 'lsx-customizer'),
72
+	'body_text_heading_color'                => esc_html__('Text (heading)', 'lsx-customizer'),
73
+	'body_text_small_color'                  => esc_html__('Text (small)', 'lsx-customizer'),
74
+	'body_text_color'                        => esc_html__('Text', 'lsx-customizer'),
75
+	'body_link_color'                        => esc_html__('Link', 'lsx-customizer'),
76
+	'body_link_hover_color'                  => esc_html__('Link (hover)', 'lsx-customizer'),
77
+	'body_section_full_background_color'     => esc_html__('Section full (background)', 'lsx-customizer'),
78
+	'body_section_full_text_color'           => esc_html__('Section full (text)', 'lsx-customizer'),
79
+	'body_section_full_link_color'           => esc_html__('Section full (link)', 'lsx-customizer'),
80
+	'body_section_full_link_hover_color'     => esc_html__('Section full (link hover)', 'lsx-customizer'),
81
+	'body_section_full_cta_background_color' => esc_html__('Section full CTA (background)', 'lsx-customizer'),
82
+	'body_section_full_cta_text_color'       => esc_html__('Section full CTA (text)', 'lsx-customizer'),
83
+	'body_section_full_cta_link_color'       => esc_html__('Section full CTA (link)', 'lsx-customizer'),
84
+	'body_section_full_cta_link_hover_color' => esc_html__('Section full CTA (link hover)', 'lsx-customizer'),
85
+
86
+	'footer_cta_background_color' => esc_html__('Background', 'lsx-customizer'),
87
+	'footer_cta_text_color'       => esc_html__('Text', 'lsx-customizer'),
88
+	'footer_cta_link_color'       => esc_html__('Link', 'lsx-customizer'),
89
+	'footer_cta_link_hover_color' => esc_html__('Link (hover)', 'lsx-customizer'),
90
+
91
+	'footer_widgets_background_color' => esc_html__('Background', 'lsx-customizer'),
92
+	'footer_widgets_text_color'       => esc_html__('Text', 'lsx-customizer'),
93
+	'footer_widgets_link_color'       => esc_html__('Link', 'lsx-customizer'),
94
+	'footer_widgets_link_hover_color' => esc_html__('Link (hover)', 'lsx-customizer'),
95
+
96
+	'footer_background_color' => esc_html__('Background', 'lsx-customizer'),
97
+	'footer_text_color'       => esc_html__('Text', 'lsx-customizer'),
98
+	'footer_link_color'       => esc_html__('Link', 'lsx-customizer'),
99
+	'footer_link_hover_color' => esc_html__('Link (hover)', 'lsx-customizer'),
100
+));
101
+
102
+$customizer_colour_choices = apply_filters('lsx_customizer_colour_choices', array(
103 103
 	'default' => array(
104
-		'label'  => __( 'Default', 'lsx-customizer' ),
105
-		'colors' => apply_filters( 'lsx_customizer_colour_choices_default', array(
104
+		'label'  => __('Default', 'lsx-customizer'),
105
+		'colors' => apply_filters('lsx_customizer_colour_choices_default', array(
106 106
 			'button_background_color'       => '#418AD0',
107 107
 			'button_background_hover_color' => '#367DC0',
108 108
 			'button_text_color'             => '#FFFFFF',
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 			'footer_text_color'       => '#ffffff',
188 188
 			'footer_link_color'       => '#F7AE00',
189 189
 			'footer_link_hover_color' => '#CE9100',
190
-		) ),
190
+		)),
191 191
 	),
192 192
 	'red' => array(
193
-		'label'  => __( 'Red', 'lsx-customizer' ),
194
-		'colors' => apply_filters( 'lsx_customizer_colour_choices_red', array(
193
+		'label'  => __('Red', 'lsx-customizer'),
194
+		'colors' => apply_filters('lsx_customizer_colour_choices_red', array(
195 195
 			'button_background_color'       => '#b64d3f',
196 196
 			'button_background_hover_color' => '#87291c',
197 197
 			'button_text_color'             => '#ffffff',
@@ -276,11 +276,11 @@  discard block
 block discarded – undo
276 276
 			'footer_text_color'       => '#ffffff',
277 277
 			'footer_link_color'       => '#b64d3f',
278 278
 			'footer_link_hover_color' => '#969696',
279
-		) ),
279
+		)),
280 280
 	),
281 281
 	'orange' => array(
282
-		'label'  => __( 'Orange', 'lsx-customizer' ),
283
-		'colors' => apply_filters( 'lsx_customizer_colour_choices_orange', array(
282
+		'label'  => __('Orange', 'lsx-customizer'),
283
+		'colors' => apply_filters('lsx_customizer_colour_choices_orange', array(
284 284
 			'button_background_color'       => '#fbaf3f',
285 285
 			'button_background_hover_color' => '#e49435',
286 286
 			'button_text_color'             => '#260e03',
@@ -365,11 +365,11 @@  discard block
 block discarded – undo
365 365
 			'footer_text_color'       => '#ffffff',
366 366
 			'footer_link_color'       => '#e4701e',
367 367
 			'footer_link_hover_color' => '#969696',
368
-		) ),
368
+		)),
369 369
 	),
370 370
 	'green' => array(
371
-		'label'  => __( 'Green', 'lsx-customizer' ),
372
-		'colors' => apply_filters( 'lsx_customizer_colour_choices_green', array(
371
+		'label'  => __('Green', 'lsx-customizer'),
372
+		'colors' => apply_filters('lsx_customizer_colour_choices_green', array(
373 373
 			'button_background_color'       => '#596b46',
374 374
 			'button_background_hover_color' => '#3d4a30',
375 375
 			'button_text_color'             => '#ffffff',
@@ -454,11 +454,11 @@  discard block
 block discarded – undo
454 454
 			'footer_text_color'       => '#ffffff',
455 455
 			'footer_link_color'       => '#596b46',
456 456
 			'footer_link_hover_color' => '#969696',
457
-		) ),
457
+		)),
458 458
 	),
459 459
 	'brown' => array(
460
-		'label'  => __( 'Brown', 'lsx-customizer' ),
461
-		'colors' => apply_filters( 'lsx_customizer_colour_choices_brown', array(
460
+		'label'  => __('Brown', 'lsx-customizer'),
461
+		'colors' => apply_filters('lsx_customizer_colour_choices_brown', array(
462 462
 			'button_background_color'       => '#8c6a45',
463 463
 			'button_background_hover_color' => '#5b452e',
464 464
 			'button_text_color'             => '#ffffff',
@@ -543,6 +543,6 @@  discard block
 block discarded – undo
543 543
 			'footer_text_color'       => '#ffffff',
544 544
 			'footer_link_color'       => '#8c6a45',
545 545
 			'footer_link_hover_color' => '#969696',
546
-		) ),
546
+		)),
547 547
 	),
548
-) );
548
+));
Please login to merge, or discard this patch.
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-colour.php 1 patch
Spacing   +141 added lines, -141 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,124 +177,124 @@  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-palette' , array(
202
-				'title'             => esc_html__( 'Block Editor Color Palette', 'lsx-customizer' ),
203
-				'description' => esc_html__( 'Add colors to use within the Gutenberg editor color palette.', 'lsx-customizer' ),
201
+			$wp_customize->add_section('colors-palette', array(
202
+				'title'             => esc_html__('Block Editor Color Palette', 'lsx-customizer'),
203
+				'description' => esc_html__('Add colors to use within the Gutenberg editor color palette.', 'lsx-customizer'),
204 204
 				'priority'          => 2,
205 205
 				'panel'             => 'colors',
206
-			) );
206
+			));
207 207
 
208
-			$wp_customize->add_section( 'colors-button' , array(
209
-				'title'             => esc_html__( 'Button', 'lsx-customizer' ),
208
+			$wp_customize->add_section('colors-button', array(
209
+				'title'             => esc_html__('Button', 'lsx-customizer'),
210 210
 				'priority'          => 3,
211 211
 				'panel'             => 'colors',
212
-			) );
212
+			));
213 213
 
214
-			$wp_customize->add_section( 'colors-button-cta' , array(
215
-				'title'             => esc_html__( 'Button CTA', 'lsx-customizer' ),
214
+			$wp_customize->add_section('colors-button-cta', array(
215
+				'title'             => esc_html__('Button CTA', 'lsx-customizer'),
216 216
 				'priority'          => 4,
217 217
 				'panel'             => 'colors',
218
-			) );
218
+			));
219 219
 
220
-			$wp_customize->add_section( 'colors-button-secondary' , array(
221
-				'title'             => esc_html__( 'Button Secondary', 'lsx-customizer' ),
220
+			$wp_customize->add_section('colors-button-secondary', array(
221
+				'title'             => esc_html__('Button Secondary', 'lsx-customizer'),
222 222
 				'priority'          => 5,
223 223
 				'panel'             => 'colors',
224
-			) );
224
+			));
225 225
 
226
-			$wp_customize->add_section( 'colors-button-tertiary' , array(
227
-				'title'             => esc_html__( 'Button Tertiary', 'lsx-customizer' ),
226
+			$wp_customize->add_section('colors-button-tertiary', array(
227
+				'title'             => esc_html__('Button Tertiary', 'lsx-customizer'),
228 228
 				'priority'          => 6,
229 229
 				'panel'             => 'colors',
230
-			) );
230
+			));
231 231
 
232
-			$wp_customize->add_section( 'colors-top-menu' , array(
233
-				'title'             => esc_html__( 'Top Menu', 'lsx-customizer' ),
232
+			$wp_customize->add_section('colors-top-menu', array(
233
+				'title'             => esc_html__('Top Menu', 'lsx-customizer'),
234 234
 				'priority'          => 7,
235 235
 				'panel'             => 'colors',
236
-			) );
236
+			));
237 237
 
238
-			$wp_customize->add_section( 'colors-header' , array(
239
-				'title'             => esc_html__( 'Header', 'lsx-customizer' ),
238
+			$wp_customize->add_section('colors-header', array(
239
+				'title'             => esc_html__('Header', 'lsx-customizer'),
240 240
 				'priority'          => 8,
241 241
 				'panel'             => 'colors',
242
-			) );
242
+			));
243 243
 
244
-			$wp_customize->add_section( 'colors-main-menu' , array(
245
-				'title'             => esc_html__( 'Main Menu', 'lsx-customizer' ),
244
+			$wp_customize->add_section('colors-main-menu', array(
245
+				'title'             => esc_html__('Main Menu', 'lsx-customizer'),
246 246
 				'priority'          => 9,
247 247
 				'panel'             => 'colors',
248
-			) );
248
+			));
249 249
 
250
-			$wp_customize->add_section( 'colors-banner' , array(
251
-				'title'             => esc_html__( 'Banner', 'lsx-customizer' ),
250
+			$wp_customize->add_section('colors-banner', array(
251
+				'title'             => esc_html__('Banner', 'lsx-customizer'),
252 252
 				'priority'          => 10,
253 253
 				'panel'             => 'colors',
254
-			) );
254
+			));
255 255
 
256
-			$wp_customize->add_section( 'colors-body' , array(
257
-				'title'             => esc_html__( 'Body', 'lsx-customizer' ),
256
+			$wp_customize->add_section('colors-body', array(
257
+				'title'             => esc_html__('Body', 'lsx-customizer'),
258 258
 				'priority'          => 11,
259 259
 				'panel'             => 'colors',
260
-			) );
260
+			));
261 261
 
262
-			$wp_customize->add_section( 'colors-footer-cta' , array(
263
-				'title'             => esc_html__( 'Footer CTA', 'lsx-customizer' ),
262
+			$wp_customize->add_section('colors-footer-cta', array(
263
+				'title'             => esc_html__('Footer CTA', 'lsx-customizer'),
264 264
 				'priority'          => 12,
265 265
 				'panel'             => 'colors',
266
-			) );
266
+			));
267 267
 
268
-			$wp_customize->add_section( 'colors-footer-widgets' , array(
269
-				'title'             => esc_html__( 'Footer Widgets', 'lsx-customizer' ),
268
+			$wp_customize->add_section('colors-footer-widgets', array(
269
+				'title'             => esc_html__('Footer Widgets', 'lsx-customizer'),
270 270
 				'priority'          => 13,
271 271
 				'panel'             => 'colors',
272
-			) );
272
+			));
273 273
 
274
-			$wp_customize->add_section( 'colors-footer' , array(
275
-				'title'             => esc_html__( 'Footer', 'lsx-customizer' ),
274
+			$wp_customize->add_section('colors-footer', array(
275
+				'title'             => esc_html__('Footer', 'lsx-customizer'),
276 276
 				'priority'          => 14,
277 277
 				'panel'             => 'colors',
278
-			) );
278
+			));
279 279
 
280 280
 			/**
281 281
 			 * Color Scheme
282 282
 			 */
283
-			$wp_customize->add_setting( 'color_scheme', array(
283
+			$wp_customize->add_setting('color_scheme', array(
284 284
 				'default'           => 'default',
285 285
 				'type'	            => 'theme_mod',
286 286
 				'transport'         => 'postMessage',
287
-			) );
287
+			));
288 288
 
289
-			$wp_customize->add_control( new LSX_Customizer_Colour_Control(
289
+			$wp_customize->add_control(new LSX_Customizer_Colour_Control(
290 290
 				$wp_customize, 'color_scheme', array(
291
-				'label'             => esc_html__( 'Base Color Scheme', 'lsx-customizer' ),
291
+				'label'             => esc_html__('Base Color Scheme', 'lsx-customizer'),
292 292
 				'section'           => 'colors-core',
293 293
 				'type'              => 'select',
294 294
 				'priority'          => 1,
295 295
 				'choices'           => $customizer_colour_choices,
296 296
 				)
297
-			) );
297
+			));
298 298
 
299 299
 			/**
300 300
 			 * Color Palette
@@ -302,30 +302,30 @@  discard block
 block discarded – undo
302 302
 			$colors = $this->get_color_scheme();
303 303
 
304 304
 			$customizer_colour_defaults = array(
305
-				__( 'Primary', 'lsx-customizer' )        => get_theme_mod( 'button_background_color', $colors['button_background_color'] ),
306
-				__( 'Strong Primary', 'lsx-button_shadow' ) => get_theme_mod( 'button_shadow', $colors['body_link_color'] ),
307
-				__( 'Call To Action', 'lsx-customizer' ) => get_theme_mod( 'button_cta_background_color', $colors['button_cta_background_color'] ),
308
-				__( 'Strong CTA', 'lsx-button_shadow' )  => get_theme_mod( 'button_cta_shadow', $colors['button_cta_shadow'] ),
309
-				__( 'Secondary', 'lsx-customizer' )      => get_theme_mod( 'button_secondary_background_color', $colors['button_secondary_background_color'] ),
310
-				__( 'Strong Secondary', 'lsx-button_shadow' ) => get_theme_mod( 'button_secondary_shadow', $colors['button_secondary_shadow'] ),
311
-				__( 'Tertiary', 'lsx-customizer' )       => get_theme_mod( 'button_tertiary_background_color', $colors['button_tertiary_background_color'] ),
312
-				__( 'Strong Tertiary', 'lsx-button_shadow' ) => get_theme_mod( 'button_tertiary_shadow', $colors['button_tertiary_shadow'] ),
313
-				__( 'Heading Color', 'lsx-customizer' )  => get_theme_mod( 'body_text_heading_color', $colors['body_text_heading_color'] ),
314
-				__( 'Body Text color', 'lsx-button_shadow' ) => get_theme_mod( 'body_text_color', $colors['body_text_color'] ),
315
-				__( 'White', 'lsx-button_shadow' )       => '#ffffff',
316
-				__( 'Black', 'lsx-button_shadow' )       => '#000000',
305
+				__('Primary', 'lsx-customizer')        => get_theme_mod('button_background_color', $colors['button_background_color']),
306
+				__('Strong Primary', 'lsx-button_shadow') => get_theme_mod('button_shadow', $colors['body_link_color']),
307
+				__('Call To Action', 'lsx-customizer') => get_theme_mod('button_cta_background_color', $colors['button_cta_background_color']),
308
+				__('Strong CTA', 'lsx-button_shadow')  => get_theme_mod('button_cta_shadow', $colors['button_cta_shadow']),
309
+				__('Secondary', 'lsx-customizer')      => get_theme_mod('button_secondary_background_color', $colors['button_secondary_background_color']),
310
+				__('Strong Secondary', 'lsx-button_shadow') => get_theme_mod('button_secondary_shadow', $colors['button_secondary_shadow']),
311
+				__('Tertiary', 'lsx-customizer')       => get_theme_mod('button_tertiary_background_color', $colors['button_tertiary_background_color']),
312
+				__('Strong Tertiary', 'lsx-button_shadow') => get_theme_mod('button_tertiary_shadow', $colors['button_tertiary_shadow']),
313
+				__('Heading Color', 'lsx-customizer')  => get_theme_mod('body_text_heading_color', $colors['body_text_heading_color']),
314
+				__('Body Text color', 'lsx-button_shadow') => get_theme_mod('body_text_color', $colors['body_text_color']),
315
+				__('White', 'lsx-button_shadow')       => '#ffffff',
316
+				__('Black', 'lsx-button_shadow')       => '#000000',
317 317
 			);
318
-			foreach ( $customizer_colour_defaults as $key => $value ) {
318
+			foreach ($customizer_colour_defaults as $key => $value) {
319 319
 
320
-				$color_name = strtolower( str_replace( ' ', '_', $key ) );
320
+				$color_name = strtolower(str_replace(' ', '_', $key));
321 321
 				$color_name = $color_name . '_color';
322 322
 
323
-				$wp_customize->add_setting( $color_name, array(
323
+				$wp_customize->add_setting($color_name, array(
324 324
 					'default'           => $value,
325 325
 					'type'              => 'theme_mod',
326 326
 					'transport'         => 'postMessage',
327 327
 					'sanitize_callback' => 'sanitize_hex_color',
328
-				) );
328
+				));
329 329
 				$wp_customize->add_control(
330 330
 					new WP_Customize_Color_Control(
331 331
 						$wp_customize,
@@ -342,53 +342,53 @@  discard block
 block discarded – undo
342 342
 			/**
343 343
 			 * Colors
344 344
 			 */
345
-			foreach ( $customizer_colour_names as $key => $value ) {
345
+			foreach ($customizer_colour_names as $key => $value) {
346 346
 				$sanitize_callback = 'sanitize_hex_color';
347 347
 
348
-				if ( 'background_color' === $key ) {
348
+				if ('background_color' === $key) {
349 349
 					$sanitize_callback = 'sanitize_hex_color_no_hash';
350 350
 				}
351 351
 
352 352
 				$section = 'colors-core';
353 353
 
354
-				if ( preg_match( '/^button_cta_.*/', $key ) ) {
354
+				if (preg_match('/^button_cta_.*/', $key)) {
355 355
 					$section = 'colors-button-cta';
356
-				} elseif ( preg_match( '/^button_secondary_.*/', $key ) ) {
356
+				} elseif (preg_match('/^button_secondary_.*/', $key)) {
357 357
 					$section = 'colors-button-secondary';
358
-				} elseif ( preg_match( '/^button_tertiary_.*/', $key ) ) {
358
+				} elseif (preg_match('/^button_tertiary_.*/', $key)) {
359 359
 					$section = 'colors-button-tertiary';
360
-				} elseif ( preg_match( '/^button_.*/', $key ) ) {
360
+				} elseif (preg_match('/^button_.*/', $key)) {
361 361
 					$section = 'colors-button';
362
-				} elseif ( preg_match( '/^top_menu_.*/', $key ) ) {
362
+				} elseif (preg_match('/^top_menu_.*/', $key)) {
363 363
 					$section = 'colors-top-menu';
364
-				} elseif ( preg_match( '/^header_.*/', $key ) ) {
364
+				} elseif (preg_match('/^header_.*/', $key)) {
365 365
 					$section = 'colors-header';
366
-				} elseif ( preg_match( '/^main_menu_.*/', $key ) ) {
366
+				} elseif (preg_match('/^main_menu_.*/', $key)) {
367 367
 					$section = 'colors-main-menu';
368
-				} elseif ( preg_match( '/^banner_.*/', $key ) ) {
368
+				} elseif (preg_match('/^banner_.*/', $key)) {
369 369
 					$section = 'colors-banner';
370
-				} elseif ( preg_match( '/^body_.*/', $key ) || 'background_color' === $key ) {
370
+				} elseif (preg_match('/^body_.*/', $key) || 'background_color' === $key) {
371 371
 					$section = 'colors-body';
372
-				} elseif ( preg_match( '/^footer_cta_.*/', $key ) ) {
372
+				} elseif (preg_match('/^footer_cta_.*/', $key)) {
373 373
 					$section = 'colors-footer-cta';
374
-				} elseif ( preg_match( '/^footer_widgets_.*/', $key ) ) {
374
+				} elseif (preg_match('/^footer_widgets_.*/', $key)) {
375 375
 					$section = 'colors-footer-widgets';
376
-				} elseif ( preg_match( '/^footer_.*/', $key ) ) {
376
+				} elseif (preg_match('/^footer_.*/', $key)) {
377 377
 					$section = 'colors-footer';
378 378
 				}
379 379
 
380
-				$wp_customize->add_setting( $key, array(
381
-					'default'           => $customizer_colour_choices['default']['colors'][ $key ],
380
+				$wp_customize->add_setting($key, array(
381
+					'default'           => $customizer_colour_choices['default']['colors'][$key],
382 382
 					'type'	            => 'theme_mod',
383 383
 					'transport'         => 'postMessage',
384 384
 					'sanitize_callback' => $sanitize_callback,
385
-				) );
385
+				));
386 386
 
387
-				$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $key, array(
387
+				$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, $key, array(
388 388
 					'label'             => $value,
389 389
 					'section'           => $section,
390 390
 					'settings'          => $key,
391
-				) ) );
391
+				)));
392 392
 			}
393 393
 		}
394 394
 
@@ -402,26 +402,26 @@  discard block
 block discarded – undo
402 402
 
403 403
 			$colors = array();
404 404
 
405
-			foreach ( $customizer_colour_names as $key => $value ) {
406
-				$colors[ $key ] = 'unquote("{{ data.' . $key . ' }}")';
405
+			foreach ($customizer_colour_names as $key => $value) {
406
+				$colors[$key] = 'unquote("{{ data.' . $key . ' }}")';
407 407
 			}
408 408
 			?>
409 409
 			<script type="text/html" id="tmpl-lsx-color-scheme">
410
-				<?php echo esc_attr( $this->top_menu->get_css( $colors ) ); ?>
411
-				<?php echo esc_attr( $this->header->get_css( $colors ) ); ?>
412
-				<?php echo esc_attr( $this->main_menu->get_css( $colors ) ); ?>
410
+				<?php echo esc_attr($this->top_menu->get_css($colors)); ?>
411
+				<?php echo esc_attr($this->header->get_css($colors)); ?>
412
+				<?php echo esc_attr($this->main_menu->get_css($colors)); ?>
413 413
 
414
-				<?php echo esc_attr( $this->banner->get_css( $colors ) ); ?>
415
-				<?php echo esc_attr( $this->body->get_css( $colors ) ); ?>
414
+				<?php echo esc_attr($this->banner->get_css($colors)); ?>
415
+				<?php echo esc_attr($this->body->get_css($colors)); ?>
416 416
 
417
-				<?php echo esc_attr( $this->footer_cta->get_css( $colors ) ); ?>
418
-				<?php echo esc_attr( $this->footer_widgets->get_css( $colors ) ); ?>
419
-				<?php echo esc_attr( $this->footer->get_css( $colors ) ); ?>
417
+				<?php echo esc_attr($this->footer_cta->get_css($colors)); ?>
418
+				<?php echo esc_attr($this->footer_widgets->get_css($colors)); ?>
419
+				<?php echo esc_attr($this->footer->get_css($colors)); ?>
420 420
 
421
-				<?php echo esc_attr( $this->button->get_css( $colors ) ); ?>
422
-				<?php echo esc_attr( $this->button_cta->get_css( $colors ) ); ?>
423
-				<?php echo esc_attr( $this->button_secondary->get_css( $colors ) ); ?>
424
-				<?php echo esc_attr( $this->button_tertiary->get_css( $colors ) ); ?>
421
+				<?php echo esc_attr($this->button->get_css($colors)); ?>
422
+				<?php echo esc_attr($this->button_cta->get_css($colors)); ?>
423
+				<?php echo esc_attr($this->button_secondary->get_css($colors)); ?>
424
+				<?php echo esc_attr($this->button_tertiary->get_css($colors)); ?>
425 425
 			</script>
426 426
 			<?php
427 427
 		}
@@ -431,16 +431,16 @@  discard block
 block discarded – undo
431 431
 		 *
432 432
 		 * @since 1.0.0
433 433
 		 */
434
-		public function scss_to_css( $scss ) {
434
+		public function scss_to_css($scss) {
435 435
 			$css                 = '';
436 436
 			$scss_php_file       = LSX_CUSTOMIZER_PATH . 'vendor/leafo/scssphp/scss.inc.php';
437 437
 			$lsx_theme_sass_file = get_template_directory() . '/assets/css/scss/lsx.scss';
438 438
 
439
-			if ( ! empty( $scss ) && file_exists( $scss_php_file ) && file_exists( $lsx_theme_sass_file ) ) {
439
+			if ( ! empty($scss) && file_exists($scss_php_file) && file_exists($lsx_theme_sass_file)) {
440 440
 				require_once $scss_php_file;
441 441
 
442 442
 				$compiler = new \Leafo\ScssPhp\Compiler();
443
-				$compiler->setFormatter( 'Leafo\ScssPhp\Formatter\Compact' );
443
+				$compiler->setFormatter('Leafo\ScssPhp\Formatter\Compact');
444 444
 
445 445
 				try {
446 446
 					$scss = '
@@ -450,8 +450,8 @@  discard block
 block discarded – undo
450 450
 						' . $scss . '
451 451
 					';
452 452
 
453
-					$css = $compiler->compile( $scss );
454
-				} catch ( \Exception $e ) {
453
+					$css = $compiler->compile($scss);
454
+				} catch (\Exception $e) {
455 455
 					$error = $e->getMessage();
456 456
 					return "/*\n\n\$error:\n\n{$error}\n\n\$scss:\n\n{$scss} */";
457 457
 				}
@@ -465,17 +465,17 @@  discard block
 block discarded – undo
465 465
 		 *
466 466
 		 * @since 1.0.0
467 467
 		 */
468
-		public static function hex2rgb( $color ) {
469
-			$color = trim( $color, '#' );
470
-
471
-			if ( strlen( $color ) === 3 ) {
472
-				$r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) );
473
-				$g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) );
474
-				$b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) );
475
-			} elseif ( strlen( $color ) === 6 ) {
476
-				$r = hexdec( substr( $color, 0, 2 ) );
477
-				$g = hexdec( substr( $color, 2, 2 ) );
478
-				$b = hexdec( substr( $color, 4, 2 ) );
468
+		public static function hex2rgb($color) {
469
+			$color = trim($color, '#');
470
+
471
+			if (strlen($color) === 3) {
472
+				$r = hexdec(substr($color, 0, 1) . substr($color, 0, 1));
473
+				$g = hexdec(substr($color, 1, 1) . substr($color, 1, 1));
474
+				$b = hexdec(substr($color, 2, 1) . substr($color, 2, 1));
475
+			} elseif (strlen($color) === 6) {
476
+				$r = hexdec(substr($color, 0, 2));
477
+				$g = hexdec(substr($color, 2, 2));
478
+				$b = hexdec(substr($color, 4, 2));
479 479
 			} else {
480 480
 				return array();
481 481
 			}
@@ -495,11 +495,11 @@  discard block
 block discarded – undo
495 495
 		public function get_color_scheme() {
496 496
 			global $customizer_colour_choices;
497 497
 
498
-			$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
498
+			$color_scheme_option = get_theme_mod('color_scheme', 'default');
499 499
 			$color_schemes = $customizer_colour_choices;
500 500
 
501
-			if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
502
-				return $color_schemes[ $color_scheme_option ]['colors'];
501
+			if (array_key_exists($color_scheme_option, $color_schemes)) {
502
+				return $color_schemes[$color_scheme_option]['colors'];
503 503
 			}
504 504
 
505 505
 			return $color_schemes['default']['colors'];
Please login to merge, or discard this patch.
classes/class-lsx-customizer-woocommerce.php 1 patch
Spacing   +226 added lines, -226 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
 			// Shop Layout Switcher.
41 41
 			//add_action( 'wp_head', array( $this, 'show_layout_switcher' ), 1 );
@@ -48,254 +48,254 @@  discard block
 block discarded – undo
48 48
 		 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
49 49
 		 * @since 1.1.1
50 50
 		 */
51
-		public function customize_register( $wp_customize ) {
51
+		public function customize_register($wp_customize) {
52 52
 			/**
53 53
 			 * Checkout.
54 54
 			 */
55 55
 
56
-			$wp_customize->add_section( 'lsx-wc-checkout' , array(
57
-				'title'       => esc_html__( 'LSX Checkout', 'lsx-customizer' ),
58
-				'description' => esc_html__( 'Change the WooCommerce checkout settings.', 'lsx-customizer' ),
56
+			$wp_customize->add_section('lsx-wc-checkout', array(
57
+				'title'       => esc_html__('LSX Checkout', 'lsx-customizer'),
58
+				'description' => esc_html__('Change the WooCommerce checkout settings.', 'lsx-customizer'),
59 59
 				'panel'       => 'woocommerce',
60 60
 				'priority'    => 3,
61
-			) );
61
+			));
62 62
 
63
-			$wp_customize->add_setting( 'lsx_checkout_steps', array(
63
+			$wp_customize->add_setting('lsx_checkout_steps', array(
64 64
 				'default'           => true,
65
-				'sanitize_callback' => array( $this, 'sanitize_checkbox' ),
66
-			) );
65
+				'sanitize_callback' => array($this, 'sanitize_checkbox'),
66
+			));
67 67
 
68
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_checkout_steps', array(
69
-				'label'       => esc_html__( 'Steps', 'lsx-customizer' ),
70
-				'description' => esc_html__( 'Enable the checkout steps header.', 'lsx-customizer' ),
68
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_checkout_steps', array(
69
+				'label'       => esc_html__('Steps', 'lsx-customizer'),
70
+				'description' => esc_html__('Enable the checkout steps header.', 'lsx-customizer'),
71 71
 				'section'     => 'lsx-wc-checkout',
72 72
 				'settings'    => 'lsx_checkout_steps',
73 73
 				'type'        => 'checkbox',
74 74
 				'priority'    => 1,
75
-			) ) );
75
+			)));
76 76
 
77 77
 			/**
78 78
 			 * Checkout Layout
79 79
 			 */
80
-			$wp_customize->add_setting( 'lsx_wc_checkout_layout', array(
80
+			$wp_customize->add_setting('lsx_wc_checkout_layout', array(
81 81
 				'default' => 'default',
82
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
83
-			) );
82
+				'sanitize_callback' => array($this, 'sanitize_select'),
83
+			));
84 84
 
85
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_checkout_layout', array(
86
-				'label'       => esc_html__( 'Layout', 'lsx-customizer' ),
87
-				'description' => esc_html__( 'WooCommerce checkout layout.', 'lsx-customizer' ),
85
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_checkout_layout', array(
86
+				'label'       => esc_html__('Layout', 'lsx-customizer'),
87
+				'description' => esc_html__('WooCommerce checkout layout.', 'lsx-customizer'),
88 88
 				'section'     => 'lsx-wc-checkout',
89 89
 				'settings'    => 'lsx_wc_checkout_layout',
90 90
 				'type'        => 'select',
91 91
 				'priority'    => 2,
92 92
 				'choices'     => array(
93
-					'default' => esc_html__( 'Default', 'lsx-customizer' ),
94
-					'stacked' => esc_html__( 'Stacked', 'lsx-customizer' ),
95
-					'columns' => esc_html__( 'Columns', 'lsx-customizer' ),
93
+					'default' => esc_html__('Default', 'lsx-customizer'),
94
+					'stacked' => esc_html__('Stacked', 'lsx-customizer'),
95
+					'columns' => esc_html__('Columns', 'lsx-customizer'),
96 96
 				),
97
-			) ) );
97
+			)));
98 98
 
99
-			$wp_customize->add_setting( 'lsx_wc_checkout_thankyou_page', array(
99
+			$wp_customize->add_setting('lsx_wc_checkout_thankyou_page', array(
100 100
 				'default' => '0',
101
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
102
-			) );
101
+				'sanitize_callback' => array($this, 'sanitize_select'),
102
+			));
103 103
 
104 104
 			$choices = array(
105
-				'0' => esc_html__( 'Default', 'lsx-customizer' ),
105
+				'0' => esc_html__('Default', 'lsx-customizer'),
106 106
 			);
107 107
 
108 108
 			/**
109 109
 			 * Distraction Free Checkout
110 110
 			 */
111
-			$wp_customize->add_setting( 'lsx_distraction_free_checkout', array(
112
-				'sanitize_callback' => array( $this, 'sanitize_checkbox' ),
113
-			) );
111
+			$wp_customize->add_setting('lsx_distraction_free_checkout', array(
112
+				'sanitize_callback' => array($this, 'sanitize_checkbox'),
113
+			));
114 114
 
115
-			$wp_customize->add_control( new WP_Customize_Control(
115
+			$wp_customize->add_control(new WP_Customize_Control(
116 116
 				$wp_customize,
117 117
 				'lsx_distraction_free_checkout',
118 118
 				array(
119
-					'label'       => esc_html__( 'Distraction Free Checkout', 'lsx-customizer' ),
120
-					'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' ),
119
+					'label'       => esc_html__('Distraction Free Checkout', 'lsx-customizer'),
120
+					'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'),
121 121
 					'section'     => 'lsx-wc-checkout',
122 122
 					'settings'    => 'lsx_distraction_free_checkout',
123 123
 					'type'        => 'checkbox',
124 124
 					'priority'    => 3,
125 125
 				)
126
-			) );
126
+			));
127 127
 
128 128
 			/**
129 129
 			 * Two Step Checkout
130 130
 			 */
131
-			$wp_customize->add_setting( 'lsx_two_step_checkout', array(
132
-				'sanitize_callback' => array( $this, 'sanitize_checkbox' ),
133
-			) );
131
+			$wp_customize->add_setting('lsx_two_step_checkout', array(
132
+				'sanitize_callback' => array($this, 'sanitize_checkbox'),
133
+			));
134 134
 
135
-			$wp_customize->add_control( new WP_Customize_Control(
135
+			$wp_customize->add_control(new WP_Customize_Control(
136 136
 				$wp_customize,
137 137
 				'lsx_two_step_checkout',
138 138
 				array(
139
-					'label'       => esc_html__( 'Two Step Checkout', 'lsx-customizer' ),
140
-					'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' ),
139
+					'label'       => esc_html__('Two Step Checkout', 'lsx-customizer'),
140
+					'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'),
141 141
 					'section'     => 'lsx-wc-checkout',
142 142
 					'settings'    => 'lsx_two_step_checkout',
143 143
 					'type'        => 'checkbox',
144 144
 					'priority'    => 4,
145 145
 				)
146
-			) );
146
+			));
147 147
 
148 148
 			/**
149 149
 			 * Thank you page options
150 150
 			 */
151 151
 			$pages = get_pages();
152 152
 
153
-			foreach ( $pages as $key => $page ) {
154
-				$choices[ $page->ID ] = $page->post_title;
153
+			foreach ($pages as $key => $page) {
154
+				$choices[$page->ID] = $page->post_title;
155 155
 			}
156 156
 
157
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_checkout_thankyou_page', array(
158
-				'label'       => esc_html__( 'Thank You Page', 'lsx-customizer' ),
159
-				'description' => esc_html__( 'WooCommerce checkout thank you page.', 'lsx-customizer' ),
157
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_checkout_thankyou_page', array(
158
+				'label'       => esc_html__('Thank You Page', 'lsx-customizer'),
159
+				'description' => esc_html__('WooCommerce checkout thank you page.', 'lsx-customizer'),
160 160
 				'section'     => 'lsx-wc-checkout',
161 161
 				'settings'    => 'lsx_wc_checkout_thankyou_page',
162 162
 				'type'        => 'select',
163 163
 				'priority'    => 5,
164 164
 				'choices'     => $choices,
165
-			) ) );
165
+			)));
166 166
 
167
-			$wp_customize->add_setting( 'lsx_wc_checkout_extra_html', array(
167
+			$wp_customize->add_setting('lsx_wc_checkout_extra_html', array(
168 168
 				'default'           => '',
169 169
 				'sanitize_callback' => 'wp_kses_post',
170
-			) );
170
+			));
171 171
 
172
-			$wp_customize->add_control( new LSX_Customizer_Wysiwyg_Control( $wp_customize, 'lsx_wc_checkout_extra_html', array(
173
-				'label'       => esc_html__( 'Extra HTML', 'lsx-customizer' ),
174
-				'description' => esc_html__( 'Extra HTML to display at checkout page (bottom/right).', 'lsx-customizer' ),
172
+			$wp_customize->add_control(new LSX_Customizer_Wysiwyg_Control($wp_customize, 'lsx_wc_checkout_extra_html', array(
173
+				'label'       => esc_html__('Extra HTML', 'lsx-customizer'),
174
+				'description' => esc_html__('Extra HTML to display at checkout page (bottom/right).', 'lsx-customizer'),
175 175
 				'section'     => 'lsx-wc-checkout',
176 176
 				'settings'    => 'lsx_wc_checkout_extra_html',
177 177
 				'priority'    => 6,
178 178
 				'type'        => 'wysiwyg',
179
-			) ) );
179
+			)));
180 180
 
181 181
 			/**
182 182
 			 * Cart.
183 183
 			 */
184 184
 
185
-			$wp_customize->add_setting( 'lsx_wc_cart_menu_item_style', array(
185
+			$wp_customize->add_setting('lsx_wc_cart_menu_item_style', array(
186 186
 				'default' => 'extended',
187
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
188
-			) );
187
+				'sanitize_callback' => array($this, 'sanitize_select'),
188
+			));
189 189
 
190
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_cart_menu_item_style', array(
191
-				'label'       => esc_html__( 'Menu Item Style', 'lsx-customizer' ),
192
-				'description' => esc_html__( 'WooCommerce menu item cart style.', 'lsx-customizer' ),
190
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_cart_menu_item_style', array(
191
+				'label'       => esc_html__('Menu Item Style', 'lsx-customizer'),
192
+				'description' => esc_html__('WooCommerce menu item cart style.', 'lsx-customizer'),
193 193
 				'section'     => 'lsx-wc-cart',
194 194
 				'settings'    => 'lsx_wc_cart_menu_item_style',
195 195
 				'type'        => 'select',
196 196
 				'priority'    => 2,
197 197
 				'choices'     => array(
198
-					'simple'   => esc_html__( 'Simple', 'lsx-customizer' ),
199
-					'extended' => esc_html__( 'Extended', 'lsx-customizer' ),
198
+					'simple'   => esc_html__('Simple', 'lsx-customizer'),
199
+					'extended' => esc_html__('Extended', 'lsx-customizer'),
200 200
 				),
201
-			) ) );
201
+			)));
202 202
 
203
-			$wp_customize->add_setting( 'lsx_wc_cart_menu_item_position', array(
203
+			$wp_customize->add_setting('lsx_wc_cart_menu_item_position', array(
204 204
 				'default' => 'main-menu-in',
205
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
206
-			) );
205
+				'sanitize_callback' => array($this, 'sanitize_select'),
206
+			));
207 207
 
208
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_cart_menu_item_position', array(
209
-				'label'       => esc_html__( 'Menu Item Position', 'lsx-customizer' ),
210
-				'description' => esc_html__( 'WooCommerce menu item cart position.', 'lsx-customizer' ),
208
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_cart_menu_item_position', array(
209
+				'label'       => esc_html__('Menu Item Position', 'lsx-customizer'),
210
+				'description' => esc_html__('WooCommerce menu item cart position.', 'lsx-customizer'),
211 211
 				'section'     => 'lsx-wc-cart',
212 212
 				'settings'    => 'lsx_wc_cart_menu_item_position',
213 213
 				'type'        => 'select',
214 214
 				'priority'    => 3,
215 215
 				'choices'     => array(
216
-					'main-menu-in'   => esc_html__( 'Main Menu (as last item)', 'lsx-customizer' ),
217
-					'main-menu-out'  => esc_html__( 'Main Menu (as last item, right aligned)', 'lsx-customizer' ),
218
-					'top-menu-left'  => esc_html__( 'Top Menu (left)', 'lsx-customizer' ),
219
-					'top-menu-right' => esc_html__( 'Top Menu (right)', 'lsx-customizer' ),
216
+					'main-menu-in'   => esc_html__('Main Menu (as last item)', 'lsx-customizer'),
217
+					'main-menu-out'  => esc_html__('Main Menu (as last item, right aligned)', 'lsx-customizer'),
218
+					'top-menu-left'  => esc_html__('Top Menu (left)', 'lsx-customizer'),
219
+					'top-menu-right' => esc_html__('Top Menu (right)', 'lsx-customizer'),
220 220
 				),
221
-			) ) );
221
+			)));
222 222
 
223
-			$wp_customize->add_setting( 'lsx_wc_cart_extra_html', array(
223
+			$wp_customize->add_setting('lsx_wc_cart_extra_html', array(
224 224
 				'default'           => '',
225 225
 				'sanitize_callback' => 'wp_kses_post',
226
-			) );
226
+			));
227 227
 
228
-			$wp_customize->add_control( new LSX_Customizer_Wysiwyg_Control( $wp_customize, 'lsx_wc_cart_extra_html', array(
229
-				'label'       => esc_html__( 'Extra HTML', 'lsx-customizer' ),
230
-				'description' => esc_html__( 'Extra HTML to display at cart page (bottom/left).', 'lsx-customizer' ),
228
+			$wp_customize->add_control(new LSX_Customizer_Wysiwyg_Control($wp_customize, 'lsx_wc_cart_extra_html', array(
229
+				'label'       => esc_html__('Extra HTML', 'lsx-customizer'),
230
+				'description' => esc_html__('Extra HTML to display at cart page (bottom/left).', 'lsx-customizer'),
231 231
 				'section'     => 'lsx-wc-cart',
232 232
 				'settings'    => 'lsx_wc_cart_extra_html',
233 233
 				'priority'    => 4,
234 234
 				'type'        => 'wysiwyg',
235
-			) ) );
235
+			)));
236 236
 
237 237
 			/**
238 238
 			 * My Account.
239 239
 			 */
240 240
 
241
-			$wp_customize->add_section( 'lsx-wc-my-account' , array(
242
-				'title'       => esc_html__( 'LSX My Account', 'lsx-customizer' ),
243
-				'description' => esc_html__( 'Change the WooCommerce My Account settings.', 'lsx-customizer' ),
241
+			$wp_customize->add_section('lsx-wc-my-account', array(
242
+				'title'       => esc_html__('LSX My Account', 'lsx-customizer'),
243
+				'description' => esc_html__('Change the WooCommerce My Account settings.', 'lsx-customizer'),
244 244
 				'panel'       => 'woocommerce',
245 245
 				'priority'    => 4,
246
-			) );
246
+			));
247 247
 
248
-			$wp_customize->add_setting( 'lsx_wc_my_account_menu_item', array(
248
+			$wp_customize->add_setting('lsx_wc_my_account_menu_item', array(
249 249
 				'default'           => false,
250
-				'sanitize_callback' => array( $this, 'sanitize_checkbox' ),
251
-			) );
250
+				'sanitize_callback' => array($this, 'sanitize_checkbox'),
251
+			));
252 252
 
253
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_my_account_menu_item', array(
254
-				'label'       => esc_html__( 'Menu Item', 'lsx-customizer' ),
255
-				'description' => esc_html__( 'Enable the My Account menu item.', 'lsx-customizer' ),
253
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_my_account_menu_item', array(
254
+				'label'       => esc_html__('Menu Item', 'lsx-customizer'),
255
+				'description' => esc_html__('Enable the My Account menu item.', 'lsx-customizer'),
256 256
 				'section'     => 'lsx-wc-my-account',
257 257
 				'settings'    => 'lsx_wc_my_account_menu_item',
258 258
 				'type'        => 'checkbox',
259 259
 				'priority'    => 1,
260
-			) ) );
260
+			)));
261 261
 
262
-			$wp_customize->add_setting( 'lsx_wc_my_account_menu_item_style', array(
262
+			$wp_customize->add_setting('lsx_wc_my_account_menu_item_style', array(
263 263
 				'default' => 'extended',
264
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
265
-			) );
264
+				'sanitize_callback' => array($this, 'sanitize_select'),
265
+			));
266 266
 
267
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_my_account_menu_item_style', array(
268
-				'label'       => esc_html__( 'Menu Item Style', 'lsx-customizer' ),
269
-				'description' => esc_html__( 'WooCommerce menu item My Account style.', 'lsx-customizer' ),
267
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_my_account_menu_item_style', array(
268
+				'label'       => esc_html__('Menu Item Style', 'lsx-customizer'),
269
+				'description' => esc_html__('WooCommerce menu item My Account style.', 'lsx-customizer'),
270 270
 				'section'     => 'lsx-wc-my-account',
271 271
 				'settings'    => 'lsx_wc_my_account_menu_item_style',
272 272
 				'type'        => 'select',
273 273
 				'priority'    => 2,
274 274
 				'choices'     => array(
275
-					'simple'   => esc_html__( 'Simple', 'lsx-customizer' ),
276
-					'extended' => esc_html__( 'Extended', 'lsx-customizer' ),
275
+					'simple'   => esc_html__('Simple', 'lsx-customizer'),
276
+					'extended' => esc_html__('Extended', 'lsx-customizer'),
277 277
 				),
278
-			) ) );
278
+			)));
279 279
 
280
-			$wp_customize->add_setting( 'lsx_wc_my_account_menu_item_position', array(
280
+			$wp_customize->add_setting('lsx_wc_my_account_menu_item_position', array(
281 281
 				'default' => 'main-menu-in',
282
-				'sanitize_callback' => array( $this, 'sanitize_select' ),
283
-			) );
282
+				'sanitize_callback' => array($this, 'sanitize_select'),
283
+			));
284 284
 
285
-			$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'lsx_wc_my_account_menu_item_position', array(
286
-				'label'       => esc_html__( 'Menu Item Position', 'lsx-customizer' ),
287
-				'description' => esc_html__( 'WooCommerce menu item My Account position.', 'lsx-customizer' ),
285
+			$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'lsx_wc_my_account_menu_item_position', array(
286
+				'label'       => esc_html__('Menu Item Position', 'lsx-customizer'),
287
+				'description' => esc_html__('WooCommerce menu item My Account position.', 'lsx-customizer'),
288 288
 				'section'     => 'lsx-wc-my-account',
289 289
 				'settings'    => 'lsx_wc_my_account_menu_item_position',
290 290
 				'type'        => 'select',
291 291
 				'priority'    => 3,
292 292
 				'choices'     => array(
293
-					'main-menu-in'   => esc_html__( 'Main Menu (as last item)', 'lsx-customizer' ),
294
-					'main-menu-out'  => esc_html__( 'Main Menu (as last item, right aligned)', 'lsx-customizer' ),
295
-					'top-menu-left'  => esc_html__( 'Top Menu (left)', 'lsx-customizer' ),
296
-					'top-menu-right' => esc_html__( 'Top Menu (right)', 'lsx-customizer' ),
293
+					'main-menu-in'   => esc_html__('Main Menu (as last item)', 'lsx-customizer'),
294
+					'main-menu-out'  => esc_html__('Main Menu (as last item, right aligned)', 'lsx-customizer'),
295
+					'top-menu-left'  => esc_html__('Top Menu (left)', 'lsx-customizer'),
296
+					'top-menu-right' => esc_html__('Top Menu (right)', 'lsx-customizer'),
297 297
 				),
298
-			) ) );
298
+			)));
299 299
 		}
300 300
 
301 301
 		/**
@@ -303,23 +303,23 @@  discard block
 block discarded – undo
303 303
 		 *
304 304
 		 * @since 1.1.1
305 305
 		 */
306
-		public function body_class( $classes ) {
307
-			$distraction_free = get_theme_mod( 'lsx_distraction_free_checkout', false );
308
-			$two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
309
-			if ( is_checkout() ) {
310
-				$layout = get_theme_mod( 'lsx_wc_checkout_layout', 'default' );
306
+		public function body_class($classes) {
307
+			$distraction_free = get_theme_mod('lsx_distraction_free_checkout', false);
308
+			$two_step_checkout = get_theme_mod('lsx_two_step_checkout', false);
309
+			if (is_checkout()) {
310
+				$layout = get_theme_mod('lsx_wc_checkout_layout', 'default');
311 311
 
312
-				if ( 'default' === $layout ) {
312
+				if ('default' === $layout) {
313 313
 					$classes[] = 'lsx-wc-checkout-layout-default';
314
-				} elseif ( 'stacked' === $layout ) {
314
+				} elseif ('stacked' === $layout) {
315 315
 					$classes[] = 'lsx-wc-checkout-layout-stacked';
316
-				} elseif ( 'columns' === $layout ) {
316
+				} elseif ('columns' === $layout) {
317 317
 					$classes[] = 'lsx-wc-checkout-layout-two-column-addreses';
318 318
 				}
319
-				if ( ! empty( $distraction_free ) ) {
319
+				if ( ! empty($distraction_free)) {
320 320
 					$classes[] = 'lsx-wc-checkout-distraction-free';
321 321
 				}
322
-				if ( ! empty( $two_step_checkout ) ) {
322
+				if ( ! empty($two_step_checkout)) {
323 323
 					$classes[] = 'lsx-wc-checkout-two-steps';
324 324
 				}
325 325
 			}
@@ -335,15 +335,15 @@  discard block
 block discarded – undo
335 335
 		public function thankyou_page() {
336 336
 			global $wp;
337 337
 
338
-			if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) {
339
-				$thankyou_page = get_theme_mod( 'lsx_wc_checkout_thankyou_page', '0' );
338
+			if (is_checkout() && ! empty($wp->query_vars['order-received'])) {
339
+				$thankyou_page = get_theme_mod('lsx_wc_checkout_thankyou_page', '0');
340 340
 
341
-				if ( ! empty( $thankyou_page ) && ! is_page( $thankyou_page ) ) {
342
-					$order_id  = apply_filters( 'woocommerce_thankyou_order_id', absint( $wp->query_vars['order-received'] ) );
343
-					$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : wc_clean( $_GET['key'] ) );
341
+				if ( ! empty($thankyou_page) && ! is_page($thankyou_page)) {
342
+					$order_id  = apply_filters('woocommerce_thankyou_order_id', absint($wp->query_vars['order-received']));
343
+					$order_key = apply_filters('woocommerce_thankyou_order_key', empty($_GET['key']) ? '' : wc_clean($_GET['key']));
344 344
 
345
-					if ( $order_id > 0 ) {
346
-						wp_safe_redirect( get_permalink( $thankyou_page ) . '?order-received=' . $order_id . '&key=' . $order_key, 302 );
345
+					if ($order_id > 0) {
346
+						wp_safe_redirect(get_permalink($thankyou_page) . '?order-received=' . $order_id . '&key=' . $order_key, 302);
347 347
 						exit;
348 348
 					}
349 349
 				}
@@ -356,95 +356,95 @@  discard block
 block discarded – undo
356 356
 		 * @since 1.1.1
357 357
 		 */
358 358
 		public function checkout_steps() {
359
-			$cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url();
360
-			if ( ( is_checkout() || is_cart() ) && ! empty( get_theme_mod( 'lsx_checkout_steps', '1' ) ) ) :
359
+			$cart_url = function_exists('wc_get_cart_url') ? wc_get_cart_url() : WC()->cart->get_cart_url();
360
+			if ((is_checkout() || is_cart()) && ! empty(get_theme_mod('lsx_checkout_steps', '1'))) :
361 361
 				global $wp;
362 362
 				?>
363 363
 				<div class="lsx-wc-checkout-steps">
364 364
 					<ul class="lsx-wc-checkout-steps-items">
365 365
 
366
-						<?php if ( is_cart() ) : ?>
366
+						<?php if (is_cart()) : ?>
367 367
 
368 368
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done">
369
-								<a href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>" class="lsx-wc-checkout-steps-link">
369
+								<a href="<?php echo esc_url(get_permalink(wc_get_page_id('shop'))); ?>" class="lsx-wc-checkout-steps-link">
370 370
 									<i class="fa fa-check-circle" aria-hidden="true"></i>
371
-									<span><span><?php esc_html_e( 'Shop', 'lsx-customizer' ); ?></span></span>
371
+									<span><span><?php esc_html_e('Shop', 'lsx-customizer'); ?></span></span>
372 372
 								</a>
373 373
 
374 374
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
375 375
 							</li>
376 376
 
377 377
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-current lsx-wc-checkout-steps-item-cart">
378
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '2', 'lsx-customizer' ); ?></i>
379
-								<span><span><?php esc_html_e( 'My Cart', 'lsx-customizer' ); ?></span></span>
378
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('2', 'lsx-customizer'); ?></i>
379
+								<span><span><?php esc_html_e('My Cart', 'lsx-customizer'); ?></span></span>
380 380
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
381 381
 							</li>
382 382
 
383 383
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-disabled lsx-wc-checkout-steps-item-payment">
384
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '3', 'lsx-customizer' ); ?></i>
385
-								<span><span><?php esc_html_e( 'Billing details', 'lsx-customizer' ); ?></span></span>
384
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('3', 'lsx-customizer'); ?></i>
385
+								<span><span><?php esc_html_e('Billing details', 'lsx-customizer'); ?></span></span>
386 386
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
387 387
 							</li>
388 388
 
389 389
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-disabled lsx-wc-checkout-steps-item-thankyou">
390
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '4', 'lsx-customizer' ); ?></i>
391
-								<span><span><?php esc_html_e( 'Payment', 'lsx-customizer' ); ?></span></span>
390
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('4', 'lsx-customizer'); ?></i>
391
+								<span><span><?php esc_html_e('Payment', 'lsx-customizer'); ?></span></span>
392 392
 							</li>
393 393
 
394
-						<?php elseif ( is_checkout() && empty( $wp->query_vars['order-received'] ) ) : ?>
394
+						<?php elseif (is_checkout() && empty($wp->query_vars['order-received'])) : ?>
395 395
 
396 396
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done">
397
-								<a href="<?php echo esc_url( get_permalink( wc_get_page_id( 'shop' ) ) ); ?>" class="lsx-wc-checkout-steps-link">
397
+								<a href="<?php echo esc_url(get_permalink(wc_get_page_id('shop'))); ?>" class="lsx-wc-checkout-steps-link">
398 398
 									<i class="fa fa-check-circle" aria-hidden="true"></i>
399
-									<span><span><?php esc_html_e( 'Shop', 'lsx-customizer' ); ?></span></span>
399
+									<span><span><?php esc_html_e('Shop', 'lsx-customizer'); ?></span></span>
400 400
 								</a>
401 401
 
402 402
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
403 403
 							</li>
404 404
 
405 405
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-cart">
406
-								<a href="<?php echo esc_url( $cart_url ); ?>" class="lsx-wc-checkout-steps-link">
406
+								<a href="<?php echo esc_url($cart_url); ?>" class="lsx-wc-checkout-steps-link">
407 407
 									<i class="fa fa-check-circle" aria-hidden="true"></i>
408
-									<span><span><?php esc_html_e( 'My Cart', 'lsx-customizer' ); ?></span></span>
408
+									<span><span><?php esc_html_e('My Cart', 'lsx-customizer'); ?></span></span>
409 409
 								</a>
410 410
 
411 411
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
412 412
 							</li>
413 413
 
414 414
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-current lsx-wc-checkout-steps-item-payment">
415
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '3', 'lsx-customizer' ); ?></i>
416
-								<span><span><?php esc_html_e( 'Billing details', 'lsx-customizer' ); ?></span></span>
415
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('3', 'lsx-customizer'); ?></i>
416
+								<span><span><?php esc_html_e('Billing details', 'lsx-customizer'); ?></span></span>
417 417
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
418 418
 							</li>
419 419
 
420 420
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-disabled lsx-wc-checkout-steps-item-thankyou">
421
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '4', 'lsx-customizer' ); ?></i>
422
-								<span><span><?php esc_html_e( 'Payment', 'lsx-customizer' ); ?></span></span>
421
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('4', 'lsx-customizer'); ?></i>
422
+								<span><span><?php esc_html_e('Payment', 'lsx-customizer'); ?></span></span>
423 423
 							</li>
424 424
 
425
-						<?php elseif ( is_checkout() ) : ?>
425
+						<?php elseif (is_checkout()) : ?>
426 426
 
427 427
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done">
428 428
 								<i class="fa fa-check-circle" aria-hidden="true"></i>
429
-								<span><span><?php esc_html_e( 'Shop', 'lsx-customizer' ); ?></span></span>
429
+								<span><span><?php esc_html_e('Shop', 'lsx-customizer'); ?></span></span>
430 430
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
431 431
 							</li>
432 432
 
433 433
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-cart">
434 434
 								<i class="fa fa-check-circle" aria-hidden="true"></i>
435
-								<span><span><?php esc_html_e( 'My Cart', 'lsx-customizer' ); ?></span></span>
435
+								<span><span><?php esc_html_e('My Cart', 'lsx-customizer'); ?></span></span>
436 436
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
437 437
 							</li>
438 438
 
439 439
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-done lsx-wc-checkout-steps-item-payment">
440 440
 								<i class="fa fa-check-circle" aria-hidden="true"></i>
441
-								<span><span><?php esc_html_e( 'Billing details', 'lsx-customizer' ); ?></span></span>
441
+								<span><span><?php esc_html_e('Billing details', 'lsx-customizer'); ?></span></span>
442 442
 								<i class="fa fa-angle-right" aria-hidden="true"></i>
443 443
 							</li>
444 444
 
445 445
 							<li class="lsx-wc-checkout-steps-item lsx-wc-checkout-steps-item-current lsx-wc-checkout-steps-item-thankyou">
446
-								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e( '4', 'lsx-customizer' ); ?></i>
447
-								<span><span><?php esc_html_e( 'Payment', 'lsx-customizer' ); ?></span></span>
446
+								<i class="lsx-wc-checkout-steps-counter" aria-hidden="true"><?php esc_html_e('4', 'lsx-customizer'); ?></i>
447
+								<span><span><?php esc_html_e('Payment', 'lsx-customizer'); ?></span></span>
448 448
 							</li>
449 449
 
450 450
 						<?php endif; ?>
@@ -461,11 +461,11 @@  discard block
 block discarded – undo
461 461
 		 * @since 1.1.1
462 462
 		 */
463 463
 		public function checkout_extra_html() {
464
-			if ( is_checkout() ) {
465
-				$checkout_extra_html = get_theme_mod( 'lsx_wc_checkout_extra_html', '' );
464
+			if (is_checkout()) {
465
+				$checkout_extra_html = get_theme_mod('lsx_wc_checkout_extra_html', '');
466 466
 
467
-				if ( ! empty( $checkout_extra_html ) ) {
468
-					add_action( 'woocommerce_review_order_after_payment', array( $this, 'checkout_extra_html_echo' ), 9 );
467
+				if ( ! empty($checkout_extra_html)) {
468
+					add_action('woocommerce_review_order_after_payment', array($this, 'checkout_extra_html_echo'), 9);
469 469
 				}
470 470
 			}
471 471
 		}
@@ -476,13 +476,13 @@  discard block
 block discarded – undo
476 476
 		 * @since 1.1.1
477 477
 		 */
478 478
 		public function checkout_extra_html_echo() {
479
-			if ( is_checkout() ) {
480
-				$checkout_extra_html = get_theme_mod( 'lsx_wc_checkout_extra_html', '' );
479
+			if (is_checkout()) {
480
+				$checkout_extra_html = get_theme_mod('lsx_wc_checkout_extra_html', '');
481 481
 
482
-				if ( ! empty( $checkout_extra_html ) ) {
482
+				if ( ! empty($checkout_extra_html)) {
483 483
 					?>
484 484
 					<div class="lsx-wc-checkout-extra-html">
485
-						<?php echo wp_kses_post( $checkout_extra_html ); ?>
485
+						<?php echo wp_kses_post($checkout_extra_html); ?>
486 486
 					</div>
487 487
 				<?php
488 488
 				}
@@ -495,12 +495,12 @@  discard block
 block discarded – undo
495 495
 		 * @since 1.1.1
496 496
 		 */
497 497
 		public function cart_extra_html() {
498
-			if ( is_cart() ) {
499
-				$cart_extra_html = get_theme_mod( 'lsx_wc_cart_extra_html', '' );
498
+			if (is_cart()) {
499
+				$cart_extra_html = get_theme_mod('lsx_wc_cart_extra_html', '');
500 500
 
501
-				if ( ! empty( $cart_extra_html ) ) {
502
-					remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
503
-					add_action( 'woocommerce_cart_collaterals', array( $this, 'cart_extra_html_echo' ), 9 );
501
+				if ( ! empty($cart_extra_html)) {
502
+					remove_action('woocommerce_cart_collaterals', 'woocommerce_cross_sell_display');
503
+					add_action('woocommerce_cart_collaterals', array($this, 'cart_extra_html_echo'), 9);
504 504
 				}
505 505
 			}
506 506
 		}
@@ -511,12 +511,12 @@  discard block
 block discarded – undo
511 511
 		 * @since 1.1.1
512 512
 		 */
513 513
 		public function cart_extra_html_echo() {
514
-			if ( is_cart() ) {
515
-				$cart_extra_html = get_theme_mod( 'lsx_wc_cart_extra_html', '' );
514
+			if (is_cart()) {
515
+				$cart_extra_html = get_theme_mod('lsx_wc_cart_extra_html', '');
516 516
 
517
-				if ( ! empty( $cart_extra_html ) ) { ?>
517
+				if ( ! empty($cart_extra_html)) { ?>
518 518
 					<div class="lsx-wc-cart-extra-html">
519
-						<?php echo wp_kses_post( $cart_extra_html ); ?>
519
+						<?php echo wp_kses_post($cart_extra_html); ?>
520 520
 					</div>
521 521
 				<?php }
522 522
 			}
@@ -527,11 +527,11 @@  discard block
 block discarded – undo
527 527
 		 *
528 528
 		 * @since 1.1.1
529 529
 		 */
530
-		public function cart_menu_item_position( $menu_position ) {
531
-			$position = get_theme_mod( 'lsx_wc_cart_menu_item_position', '' );
530
+		public function cart_menu_item_position($menu_position) {
531
+			$position = get_theme_mod('lsx_wc_cart_menu_item_position', '');
532 532
 
533
-			if ( ! empty( $position ) ) {
534
-				switch ( $position ) {
533
+			if ( ! empty($position)) {
534
+				switch ($position) {
535 535
 					case 'main-menu-in':
536 536
 					case 'main-menu-out':
537 537
 						$menu_position = 'primary';
@@ -555,16 +555,16 @@  discard block
 block discarded – undo
555 555
 		 *
556 556
 		 * @since 1.1.1
557 557
 		 */
558
-		public function cart_menu_item_class( $item_class ) {
559
-			$position = get_theme_mod( 'lsx_wc_cart_menu_item_position', '' );
558
+		public function cart_menu_item_class($item_class) {
559
+			$position = get_theme_mod('lsx_wc_cart_menu_item_position', '');
560 560
 
561
-			if ( 'main-menu-out' === $position ) {
561
+			if ('main-menu-out' === $position) {
562 562
 				$item_class .= ' lsx-wc-cart-menu-item-right-aligned';
563 563
 			}
564 564
 
565
-			$style = get_theme_mod( 'lsx_wc_cart_menu_item_style', '' );
565
+			$style = get_theme_mod('lsx_wc_cart_menu_item_style', '');
566 566
 
567
-			if ( 'simple' === $style ) {
567
+			if ('simple' === $style) {
568 568
 				$item_class .= ' lsx-wc-cart-menu-item-simple';
569 569
 			}
570 570
 
@@ -576,47 +576,47 @@  discard block
 block discarded – undo
576 576
 		 *
577 577
 		 * @since 1.1.1
578 578
 		 */
579
-		public function my_account_menu_item( $items, $args ) {
580
-			$my_account_menu_item_position = apply_filters( 'lsx_wc_my_account_menu_item_position', 'primary' );
579
+		public function my_account_menu_item($items, $args) {
580
+			$my_account_menu_item_position = apply_filters('lsx_wc_my_account_menu_item_position', 'primary');
581 581
 
582
-			if ( $my_account_menu_item_position === $args->theme_location || ( 'primary_logged_out' === $args->theme_location && 'primary' === $my_account_menu_item_position ) ) {
583
-				$customizer_option  = get_theme_mod( 'lsx_wc_my_account_menu_item', false );
582
+			if ($my_account_menu_item_position === $args->theme_location || ('primary_logged_out' === $args->theme_location && 'primary' === $my_account_menu_item_position)) {
583
+				$customizer_option = get_theme_mod('lsx_wc_my_account_menu_item', false);
584 584
 
585
-				if ( ! empty( $customizer_option ) ) {
586
-					if ( is_account_page() ) {
585
+				if ( ! empty($customizer_option)) {
586
+					if (is_account_page()) {
587 587
 						$class = 'current-menu-item';
588 588
 					} else {
589 589
 						$class = '';
590 590
 					}
591 591
 
592 592
 					$item_class = 'menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children dropdown lsx-wc-my-account-menu-item ' . $class;
593
-					$item_class = apply_filters( 'lsx_wc_my_account_menu_item_class', $item_class );
593
+					$item_class = apply_filters('lsx_wc_my_account_menu_item_class', $item_class);
594 594
 
595 595
 					$endpoints = WC()->query->get_query_vars();
596 596
 
597
-					if ( is_user_logged_in() ) {
597
+					if (is_user_logged_in()) {
598 598
 						$item  = '<li class="' . $item_class . '">';
599
-						$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>';
599
+						$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>';
600 600
 						$item .= '<ul role="menu" class=" dropdown-menu lsx-wc-my-account-sub-menu">';
601
-							foreach ( wc_get_account_menu_items() as $endpoint => $label ) {
601
+							foreach (wc_get_account_menu_items() as $endpoint => $label) {
602 602
 								$slug = $endpoint;
603
-								if ( isset( $endpoints[ $endpoint ] ) && '' !== $endpoints[ $endpoint ] ) {
604
-									$slug = $endpoints[ $endpoint ];
603
+								if (isset($endpoints[$endpoint]) && '' !== $endpoints[$endpoint]) {
604
+									$slug = $endpoints[$endpoint];
605 605
 								}
606
-								if ( 'dashboard' === $slug ) {
606
+								if ('dashboard' === $slug) {
607 607
 									$slug = '';
608 608
 								}
609
-								$item .= '<li class="menu-item"><a title="" href="' . esc_url( get_permalink( wc_get_page_id( 'myaccount' ) ) . $slug ) . '">' . $label . '</a></li>';
609
+								$item .= '<li class="menu-item"><a title="" href="' . esc_url(get_permalink(wc_get_page_id('myaccount')) . $slug) . '">' . $label . '</a></li>';
610 610
 							}
611 611
 						$item .= '</ul></li>';
612 612
 
613 613
 					} else {
614 614
 						$item = '<li class="' . $item_class . '">' .
615
-									'<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>' .
615
+									'<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>' .
616 616
 								'</li>';
617 617
 					}
618 618
 
619
-					if ( 'top-menu' === $args->theme_location ) {
619
+					if ('top-menu' === $args->theme_location) {
620 620
 						$items = $item . $items;
621 621
 					} else {
622 622
 						$items = $items . $item;
@@ -632,11 +632,11 @@  discard block
 block discarded – undo
632 632
 		 *
633 633
 		 * @since 1.1.1
634 634
 		 */
635
-		public function my_account_menu_item_position( $menu_position ) {
636
-			$position = get_theme_mod( 'lsx_wc_my_account_menu_item_position', '' );
635
+		public function my_account_menu_item_position($menu_position) {
636
+			$position = get_theme_mod('lsx_wc_my_account_menu_item_position', '');
637 637
 
638
-			if ( ! empty( $position ) ) {
639
-				switch ( $position ) {
638
+			if ( ! empty($position)) {
639
+				switch ($position) {
640 640
 					case 'main-menu-in':
641 641
 					case 'main-menu-out':
642 642
 						$menu_position = 'primary';
@@ -660,20 +660,20 @@  discard block
 block discarded – undo
660 660
 		 *
661 661
 		 * @since 1.1.1
662 662
 		 */
663
-		public function my_account_menu_item_class( $item_class ) {
664
-			$position = get_theme_mod( 'lsx_wc_my_account_menu_item_position', '' );
663
+		public function my_account_menu_item_class($item_class) {
664
+			$position = get_theme_mod('lsx_wc_my_account_menu_item_position', '');
665 665
 
666
-			if ( 'main-menu-out' === $position ) {
666
+			if ('main-menu-out' === $position) {
667 667
 				$item_class .= ' lsx-wc-my-account-menu-item-right-aligned';
668 668
 			}
669 669
 
670
-			if ( ! is_user_logged_in() ) {
670
+			if ( ! is_user_logged_in()) {
671 671
 				$item_class .= ' lsx-wc-my-account-login';
672 672
 			}
673 673
 
674
-			$style = get_theme_mod( 'lsx_wc_my_account_menu_item_style', '' );
674
+			$style = get_theme_mod('lsx_wc_my_account_menu_item_style', '');
675 675
 
676
-			if ( 'simple' === $style ) {
676
+			if ('simple' === $style) {
677 677
 				$item_class .= ' lsx-wc-my-account-menu-item-simple';
678 678
 			}
679 679
 
@@ -684,13 +684,13 @@  discard block
 block discarded – undo
684 684
 		 */
685 685
 		public function show_layout_switcher() {
686 686
 			$body_classes = get_body_class();
687
-			if ( in_array( 'post-type-archive-product', $body_classes ) ) {
687
+			if (in_array('post-type-archive-product', $body_classes)) {
688 688
 				global $WC_List_Grid;
689
-				if ( null !== $WC_List_Grid ) {
690
-					remove_action( 'woocommerce_before_shop_loop', array( $WC_List_Grid, 'gridlist_toggle_button' ), 30 );
691
-					add_action( 'lsx_banner_inner_bottom', array( $this, 'shop_gridlist_toggle_button' ), 90 );
692
-					add_action( 'lsx_global_header_inner_bottom', array( $this, 'shop_gridlist_toggle_button' ), 90 );
693
-					wp_deregister_style( 'grid-list-button' );
689
+				if (null !== $WC_List_Grid) {
690
+					remove_action('woocommerce_before_shop_loop', array($WC_List_Grid, 'gridlist_toggle_button'), 30);
691
+					add_action('lsx_banner_inner_bottom', array($this, 'shop_gridlist_toggle_button'), 90);
692
+					add_action('lsx_global_header_inner_bottom', array($this, 'shop_gridlist_toggle_button'), 90);
693
+					wp_deregister_style('grid-list-button');
694 694
 				}
695 695
 			}
696 696
 		}
@@ -701,13 +701,13 @@  discard block
 block discarded – undo
701 701
 			global $WC_List_Grid;
702 702
 			?>
703 703
 			<div class="lsx-layout-switcher">
704
-				<span class="lsx-layout-switcher-label"><?php esc_html_e( 'Select view:', 'lsx-blog-customizer' ); ?></span>
704
+				<span class="lsx-layout-switcher-label"><?php esc_html_e('Select view:', 'lsx-blog-customizer'); ?></span>
705 705
 				<?php $WC_List_Grid->gridlist_toggle_button(); ?>
706 706
 			</div>
707 707
 			<?php
708 708
 		}
709
-		public function gridlist_toggle_button_output( $output, $grid_view, $list_view ) {
710
-			$output = sprintf( '<div class="gridlist-toggle lsx-layout-switcher-options"><a href="#" class="lsx-layout-switcher-option" id="grid" title="%1$s"><span class="fa fa fa-th"></span></a><a href="#" class="lsx-layout-switcher-option" id="list" title="%2$s"><span class="fa fa-bars"></span></a></div>', $grid_view, $list_view );
709
+		public function gridlist_toggle_button_output($output, $grid_view, $list_view) {
710
+			$output = sprintf('<div class="gridlist-toggle lsx-layout-switcher-options"><a href="#" class="lsx-layout-switcher-option" id="grid" title="%1$s"><span class="fa fa fa-th"></span></a><a href="#" class="lsx-layout-switcher-option" id="list" title="%2$s"><span class="fa fa-bars"></span></a></div>', $grid_view, $list_view);
711 711
 			return $output;
712 712
 		}
713 713
 	}
Please login to merge, or discard this patch.
classes/class-lsx-customizer-frontend.php 1 patch
Spacing   +80 added lines, -80 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,12 +18,12 @@  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_enqueue_scripts', array( $this, 'lsx_customizer_color_palette_css' ), 2999 );
23
-			add_action( 'wp', array( $this, 'layout' ), 2999 );
24
-			add_action( 'wp', array( $this, 'lsx_distraction_free_checkout' ), 2999 );
25
-			add_action( 'wp', array( $this, 'lsx_customizer_two_step_checkout' ) );
26
-			add_action( 'after_setup_theme', array( $this, 'lsx_customizer_color_palette_setup' ), 100 );
21
+			add_action('wp_enqueue_scripts', array($this, 'assets'), 2999);
22
+			add_action('wp_enqueue_scripts', array($this, 'lsx_customizer_color_palette_css'), 2999);
23
+			add_action('wp', array($this, 'layout'), 2999);
24
+			add_action('wp', array($this, 'lsx_distraction_free_checkout'), 2999);
25
+			add_action('wp', array($this, 'lsx_customizer_two_step_checkout'));
26
+			add_action('after_setup_theme', array($this, 'lsx_customizer_color_palette_setup'), 100);
27 27
 		}
28 28
 
29 29
 		/**
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 		 * @since 1.0.0
33 33
 		 */
34 34
 		public function assets() {
35
-			wp_enqueue_script( 'lsx-customizer', LSX_CUSTOMIZER_URL . 'assets/js/lsx-customizer.min.js', array( 'jquery' ), LSX_CUSTOMIZER_VER, true );
35
+			wp_enqueue_script('lsx-customizer', LSX_CUSTOMIZER_URL . 'assets/js/lsx-customizer.min.js', array('jquery'), LSX_CUSTOMIZER_VER, true);
36 36
 
37
-			$params = apply_filters( 'lsx_customizer_js_params', array(
38
-				'ajax_url' => admin_url( 'admin-ajax.php' ),
37
+			$params = apply_filters('lsx_customizer_js_params', array(
38
+				'ajax_url' => admin_url('admin-ajax.php'),
39 39
 			));
40 40
 
41
-			wp_localize_script( 'lsx-customizer', 'lsx_customizer_params', $params );
41
+			wp_localize_script('lsx-customizer', 'lsx_customizer_params', $params);
42 42
 
43
-			wp_enqueue_style( 'lsx-customizer', LSX_CUSTOMIZER_URL . 'assets/css/lsx-customizer.css', array(), LSX_CUSTOMIZER_VER );
44
-			wp_style_add_data( 'lsx-customizer', 'rtl', 'replace' );
43
+			wp_enqueue_style('lsx-customizer', LSX_CUSTOMIZER_URL . 'assets/css/lsx-customizer.css', array(), LSX_CUSTOMIZER_VER);
44
+			wp_style_add_data('lsx-customizer', 'rtl', 'replace');
45 45
 
46
-			$two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
47
-			if ( is_checkout() && ! empty( $two_step_checkout ) ) {
46
+			$two_step_checkout = get_theme_mod('lsx_two_step_checkout', false);
47
+			if (is_checkout() && ! empty($two_step_checkout)) {
48 48
 
49
-				wp_enqueue_script( 'flexslider', LSX_CUSTOMIZER_URL . 'assets/js/jquery.flexslider.min.js', array( 'jquery' ), '2.5.0' );
49
+				wp_enqueue_script('flexslider', LSX_CUSTOMIZER_URL . 'assets/js/jquery.flexslider.min.js', array('jquery'), '2.5.0');
50 50
 			}
51 51
 
52 52
 		}
@@ -59,84 +59,84 @@  discard block
 block discarded – undo
59 59
 		public function lsx_customizer_color_palette_css() {
60 60
 			$styles = '
61 61
 			.container #primary.content-area .has-primary-color-background-color {
62
-				background-color:' . get_theme_mod( 'primary_color', '#428bca' ) . ';
62
+				background-color:' . get_theme_mod('primary_color', '#428bca') . ';
63 63
 			}
64 64
 			.container #primary.content-area .has-primary-color-color {
65
-				color: ' . get_theme_mod( 'primary_color', '#428bca' ) . ';
65
+				color: ' . get_theme_mod('primary_color', '#428bca') . ';
66 66
 			}
67 67
 
68 68
 			.container #primary.content-area .has-strong-primary-color-background-color {
69
-				background-color:' . get_theme_mod( 'strong_primary_color', '#2a6496' ) . ';
69
+				background-color:' . get_theme_mod('strong_primary_color', '#2a6496') . ';
70 70
 			}
71 71
 			.container #primary.content-area .has-strong-primary-color-color {
72
-				color: ' . get_theme_mod( 'strong_primary_color', '#2a6496' ) . ';
72
+				color: ' . get_theme_mod('strong_primary_color', '#2a6496') . ';
73 73
 			}
74 74
 
75 75
 			.container #primary.content-area .has-cta-color-background-color {
76
-				background-color:' . get_theme_mod( 'call_to_action_color', '#f7941d' ) . ';
76
+				background-color:' . get_theme_mod('call_to_action_color', '#f7941d') . ';
77 77
 			}
78 78
 			.container #primary.content-area .has-cta-color-color {
79
-				color: ' . get_theme_mod( 'call_to_action_color', '#f7941d' ) . ';
79
+				color: ' . get_theme_mod('call_to_action_color', '#f7941d') . ';
80 80
 			}
81 81
 
82 82
 			.container #primary.content-area .has-strong-cta-color-background-color {
83
-				background-color:' . get_theme_mod( 'strong_cta_color', '#f7741d' ) . ';
83
+				background-color:' . get_theme_mod('strong_cta_color', '#f7741d') . ';
84 84
 			}
85 85
 			.container #primary.content-area .has-strong-cta-color-color {
86
-				color: ' . get_theme_mod( 'strong_cta_color', '#f7741d' ) . ';
86
+				color: ' . get_theme_mod('strong_cta_color', '#f7741d') . ';
87 87
 			}
88 88
 
89 89
 			.container #primary.content-area .has-strong-cta-color-background-color {
90
-				background-color:' . get_theme_mod( 'strong_cta_color', '#f7741d' ) . ';
90
+				background-color:' . get_theme_mod('strong_cta_color', '#f7741d') . ';
91 91
 			}
92 92
 			.container #primary.content-area .has-strong-cta-color-color {
93
-				color: ' . get_theme_mod( 'strong_cta_color', '#f7741d' ) . ';
93
+				color: ' . get_theme_mod('strong_cta_color', '#f7741d') . ';
94 94
 			}
95 95
 
96 96
 			.container #primary.content-area .has-secondary-color-background-color {
97
-				background-color:' . get_theme_mod( 'secondary_color', '#eaeaea' ) . ';
97
+				background-color:' . get_theme_mod('secondary_color', '#eaeaea') . ';
98 98
 			}
99 99
 			.container #primary.content-area .has-secondary-color-color {
100
-				color: ' . get_theme_mod( 'secondary_color', '#eaeaea' ) . ';
100
+				color: ' . get_theme_mod('secondary_color', '#eaeaea') . ';
101 101
 			}
102 102
 
103 103
 			.container #primary.content-area .has-strong-secondary-color-background-color {
104
-				background-color:' . get_theme_mod( 'strong_secondary_color', '#c4c4c4' ) . ';
104
+				background-color:' . get_theme_mod('strong_secondary_color', '#c4c4c4') . ';
105 105
 			}
106 106
 			.container #primary.content-area .has-strong-secondary-color-color {
107
-				color: ' . get_theme_mod( 'strong_secondary_color', '#c4c4c4' ) . ';
107
+				color: ' . get_theme_mod('strong_secondary_color', '#c4c4c4') . ';
108 108
 			}
109 109
 
110 110
 			.container #primary.content-area .has-tertiary-color-background-color {
111
-				background-color:' . get_theme_mod( 'tertiary_color', '#6BA913' ) . ';
111
+				background-color:' . get_theme_mod('tertiary_color', '#6BA913') . ';
112 112
 			}
113 113
 			.container #primary.content-area .has-tertiary-color-color {
114
-				color: ' . get_theme_mod( 'tertiary_color', '#6BA913' ) . ';
114
+				color: ' . get_theme_mod('tertiary_color', '#6BA913') . ';
115 115
 			}
116 116
 
117 117
 			.container #primary.content-area .has-strong-tertiary-color-background-color {
118
-				background-color:' . get_theme_mod( 'strong_tertiary_color', '#3F640B' ) . ';
118
+				background-color:' . get_theme_mod('strong_tertiary_color', '#3F640B') . ';
119 119
 			}
120 120
 			.container #primary.content-area .has-strong-tertiary-color-color {
121
-				color: ' . get_theme_mod( 'strong_tertiary_color', '#3F640B' ) . ';
121
+				color: ' . get_theme_mod('strong_tertiary_color', '#3F640B') . ';
122 122
 			}
123 123
 
124 124
 			.container #primary.content-area .has-heading-color-background-color {
125
-				background-color:' . get_theme_mod( 'heading_color', '#4a4a4a' ) . ';
125
+				background-color:' . get_theme_mod('heading_color', '#4a4a4a') . ';
126 126
 			}
127 127
 			.container #primary.content-area .has-heading-color-color {
128
-				color: ' . get_theme_mod( 'heading_color', '#4a4a4a' ) . ';
128
+				color: ' . get_theme_mod('heading_color', '#4a4a4a') . ';
129 129
 			}
130 130
 
131 131
 			.container #primary.content-area .has-body-color-background-color {
132
-				background-color:' . get_theme_mod( 'body_text_color_color', '#444444' ) . ';
132
+				background-color:' . get_theme_mod('body_text_color_color', '#444444') . ';
133 133
 			}
134 134
 			.container #primary.content-area .has-body-color-color {
135
-				color: ' . get_theme_mod( 'body_text_color_color', '#444444' ) . ';
135
+				color: ' . get_theme_mod('body_text_color_color', '#444444') . ';
136 136
 			}
137 137
 
138 138
 			';
139
-			wp_add_inline_style( 'lsx-customizer', $styles );
139
+			wp_add_inline_style('lsx-customizer', $styles);
140 140
 		}
141 141
 
142 142
 		/**
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 		 * @since 1.0.0
146 146
 		 */
147 147
 		public function layout() {
148
-			$theme_credit = get_theme_mod( 'lsx_theme_credit_status', true );
148
+			$theme_credit = get_theme_mod('lsx_theme_credit_status', true);
149 149
 
150
-			if ( false == $theme_credit ) {
151
-				add_filter( 'lsx_credit_link', '__return_false' );
150
+			if (false == $theme_credit) {
151
+				add_filter('lsx_credit_link', '__return_false');
152 152
 			}
153 153
 		}
154 154
 
@@ -160,10 +160,10 @@  discard block
 block discarded – undo
160 160
 		 */
161 161
 		public function lsx_distraction_free_checkout() {
162 162
 
163
-			$distraction_free = get_theme_mod( 'lsx_distraction_free_checkout', false );
163
+			$distraction_free = get_theme_mod('lsx_distraction_free_checkout', false);
164 164
 
165
-			if ( is_checkout() && ! empty( $distraction_free ) ) {
166
-				remove_action( 'lsx_body_bottom', 'lsx_wc_footer_bar', 15 );
165
+			if (is_checkout() && ! empty($distraction_free)) {
166
+				remove_action('lsx_body_bottom', 'lsx_wc_footer_bar', 15);
167 167
 
168 168
 			}
169 169
 		}
@@ -175,18 +175,18 @@  discard block
 block discarded – undo
175 175
 		 * @return  void
176 176
 		 */
177 177
 		public function lsx_customizer_two_step_checkout() {
178
-			$two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
179
-
180
-			if ( is_checkout() && ! empty( $two_step_checkout ) ) {
181
-				add_action( 'woocommerce_checkout_before_customer_details', 'lsx_customizer_checkout_form_wrapper_div', 1 );
182
-				add_action( 'woocommerce_checkout_before_customer_details', 'lsx_customizer_checkout_form_wrapper', 2 );
183
-				add_action( 'woocommerce_checkout_order_review', 'lsx_customizer_close_div', 30 );
184
-				add_action( 'woocommerce_checkout_order_review', 'lsx_customizer_close_ul', 30 );
185
-				add_action( 'woocommerce_checkout_before_customer_details', 'lsx_customizer_address_wrapper', 5 );
186
-				add_action( 'woocommerce_checkout_after_customer_details', 'lsx_customizer_close_li' );
187
-				add_action( 'wp_footer', 'lsx_customizer_fire_flexslider' );
188
-				add_action( 'woocommerce_checkout_before_order_review', 'lsx_customizer_order_review_wrap', 1 );
189
-				add_action( 'woocommerce_checkout_after_order_review', 'lsx_customizer_close_li', 40 );
178
+			$two_step_checkout = get_theme_mod('lsx_two_step_checkout', false);
179
+
180
+			if (is_checkout() && ! empty($two_step_checkout)) {
181
+				add_action('woocommerce_checkout_before_customer_details', 'lsx_customizer_checkout_form_wrapper_div', 1);
182
+				add_action('woocommerce_checkout_before_customer_details', 'lsx_customizer_checkout_form_wrapper', 2);
183
+				add_action('woocommerce_checkout_order_review', 'lsx_customizer_close_div', 30);
184
+				add_action('woocommerce_checkout_order_review', 'lsx_customizer_close_ul', 30);
185
+				add_action('woocommerce_checkout_before_customer_details', 'lsx_customizer_address_wrapper', 5);
186
+				add_action('woocommerce_checkout_after_customer_details', 'lsx_customizer_close_li');
187
+				add_action('wp_footer', 'lsx_customizer_fire_flexslider');
188
+				add_action('woocommerce_checkout_before_order_review', 'lsx_customizer_order_review_wrap', 1);
189
+				add_action('woocommerce_checkout_after_order_review', 'lsx_customizer_close_li', 40);
190 190
 			}
191 191
 		}
192 192
 
@@ -196,64 +196,64 @@  discard block
 block discarded – undo
196 196
 		 * @return void
197 197
 		 */
198 198
 		public function lsx_customizer_color_palette_setup() {
199
-			add_theme_support( 'editor-color-palette', array(
199
+			add_theme_support('editor-color-palette', array(
200 200
 				array(
201
-					'name'  => esc_html__( 'Primary Color', 'lsx-customizer' ),
201
+					'name'  => esc_html__('Primary Color', 'lsx-customizer'),
202 202
 					'slug'  => 'primary-color',
203
-					'color' => get_theme_mod( 'primary_color', '#428bca' ),
203
+					'color' => get_theme_mod('primary_color', '#428bca'),
204 204
 				),
205 205
 				array(
206
-					'name'  => esc_html__( 'Strong Primary Color', 'lsx-customizer' ),
206
+					'name'  => esc_html__('Strong Primary Color', 'lsx-customizer'),
207 207
 					'slug'  => 'strong-primary-color',
208
-					'color' => get_theme_mod( 'strong_primary_color', '#2a6496' ),
208
+					'color' => get_theme_mod('strong_primary_color', '#2a6496'),
209 209
 				),
210 210
 				array(
211
-					'name'  => esc_html__( 'CTA Color', 'lsx-customizer' ),
211
+					'name'  => esc_html__('CTA Color', 'lsx-customizer'),
212 212
 					'slug'  => 'cta-color',
213
-					'color' => get_theme_mod( 'call_to_action_color', '#f7941d' ),
213
+					'color' => get_theme_mod('call_to_action_color', '#f7941d'),
214 214
 				),
215 215
 				array(
216
-					'name'  => esc_html__( 'Strong CTA Color', 'lsx-customizer' ),
216
+					'name'  => esc_html__('Strong CTA Color', 'lsx-customizer'),
217 217
 					'slug'  => 'strong-cta-color',
218
-					'color' => get_theme_mod( 'strong_cta_color', '#f7741d' ),
218
+					'color' => get_theme_mod('strong_cta_color', '#f7741d'),
219 219
 				),
220 220
 				array(
221
-					'name'  => esc_html__( 'Secondary Color', 'lsx-customizer' ),
221
+					'name'  => esc_html__('Secondary Color', 'lsx-customizer'),
222 222
 					'slug'  => 'secondary-color',
223
-					'color' => get_theme_mod( 'secondary_color', '#eaeaea' ),
223
+					'color' => get_theme_mod('secondary_color', '#eaeaea'),
224 224
 				),
225 225
 				array(
226
-					'name'  => esc_html__( 'Strong Secondary Color', 'lsx-customizer' ),
226
+					'name'  => esc_html__('Strong Secondary Color', 'lsx-customizer'),
227 227
 					'slug'  => 'strong-secondary-color',
228
-					'color' => get_theme_mod( 'strong_secondary_color', '#c4c4c4' ),
228
+					'color' => get_theme_mod('strong_secondary_color', '#c4c4c4'),
229 229
 				),
230 230
 				array(
231
-					'name'  => esc_html__( 'Tertiary Color', 'lsx-customizer' ),
231
+					'name'  => esc_html__('Tertiary Color', 'lsx-customizer'),
232 232
 					'slug'  => 'tertiary-color',
233
-					'color' => get_theme_mod( 'tertiary_color', '#6BA913' ),
233
+					'color' => get_theme_mod('tertiary_color', '#6BA913'),
234 234
 				),
235 235
 				array(
236
-					'name'  => esc_html__( 'Strong Tertiary Color', 'lsx-customizer' ),
236
+					'name'  => esc_html__('Strong Tertiary Color', 'lsx-customizer'),
237 237
 					'slug'  => 'strong-tertiary-color',
238
-					'color' => get_theme_mod( 'strong_tertiary_color', '#3F640B' ),
238
+					'color' => get_theme_mod('strong_tertiary_color', '#3F640B'),
239 239
 				),
240 240
 				array(
241
-					'name'  => esc_html__( 'Heading Color', 'lsx-customizer' ),
241
+					'name'  => esc_html__('Heading Color', 'lsx-customizer'),
242 242
 					'slug'  => 'heading-color',
243
-					'color' => get_theme_mod( 'heading_color_color', '#4a4a4a' ),
243
+					'color' => get_theme_mod('heading_color_color', '#4a4a4a'),
244 244
 				),
245 245
 				array(
246
-					'name'  => esc_html__( 'Body Color', 'lsx-customizer' ),
246
+					'name'  => esc_html__('Body Color', 'lsx-customizer'),
247 247
 					'slug'  => 'body-color',
248
-					'color' => get_theme_mod( 'body_text_color_color', '#444444' ),
248
+					'color' => get_theme_mod('body_text_color_color', '#444444'),
249 249
 				),
250 250
 				array(
251
-					'name'  => esc_html__( 'White', 'lsx-customizer' ),
251
+					'name'  => esc_html__('White', 'lsx-customizer'),
252 252
 					'slug'  => 'white',
253 253
 					'color' => '#ffffff',
254 254
 				),
255 255
 				array(
256
-					'name'  => esc_html__( 'Black', 'lsx-customizer' ),
256
+					'name'  => esc_html__('Black', 'lsx-customizer'),
257 257
 					'slug'  => 'black',
258 258
 					'color' => '#000000',
259 259
 				),
Please login to merge, or discard this patch.