Passed
Push — master ( 1a19f8...92e7ad )
by Virginia
03:44
created
classes/class-lsx-customizer-colour-button.php 2 patches
Spacing   +30 added lines, -30 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_Button' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Button')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Button Class
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 		 * @since 1.0.0
19 19
 		 */
20 20
 		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
21
+			add_action('after_switch_theme', array($this, 'set_theme_mod'));
22
+			add_action('customize_save_after', array($this, 'set_theme_mod'));
23 23
 
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
24
+			add_action('wp_enqueue_scripts', array($this, 'enqueue_css'), 2999);
25 25
 		}
26 26
 
27 27
 		/**
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 		 */
32 32
 		public function set_theme_mod() {
33 33
 			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
34
+			$styles     = $this->get_css($theme_mods);
35 35
 
36
-			set_theme_mod( 'lsx_customizer_colour__button_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__button_theme_mod', $styles);
37 37
 		}
38 38
 
39 39
 		/**
@@ -42,20 +42,20 @@  discard block
 block discarded – undo
42 42
 		 * @since 1.0.0
43 43
 		 */
44 44
 		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__button_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__button_theme_mod');
46 46
 
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
47
+			if (is_customize_preview() || false === $styles_from_theme_mod) {
48 48
 				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
49
+				$styles     = $this->get_css($theme_mods);
50 50
 
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__button_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__button_theme_mod', $styles);
53 53
 				}
54 54
 			} else {
55 55
 				$styles = $styles_from_theme_mod;
56 56
 			}
57 57
 
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
58
+			wp_add_inline_style('lsx-customizer', $styles);
59 59
 		}
60 60
 
61 61
 		/**
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 		public function get_theme_mods() {
67 67
 			$colors = parent::get_color_scheme();
68 68
 
69
-			return apply_filters( 'lsx_customizer_colours_button', array(
70
-				'button_background_color'       => get_theme_mod( 'button_background_color',       $colors['button_background_color'] ),
71
-				'button_background_hover_color' => get_theme_mod( 'button_background_hover_color', $colors['button_background_hover_color'] ),
72
-				'button_text_color'             => get_theme_mod( 'button_text_color',             $colors['button_text_color'] ),
73
-				'button_text_color_hover'       => get_theme_mod( 'button_text_color_hover',       $colors['button_text_color_hover'] ),
74
-				'button_shadow'                 => get_theme_mod( 'button_shadow',                 $colors['button_shadow'] ),
75
-			) );
69
+			return apply_filters('lsx_customizer_colours_button', array(
70
+				'button_background_color'       => get_theme_mod('button_background_color', $colors['button_background_color']),
71
+				'button_background_hover_color' => get_theme_mod('button_background_hover_color', $colors['button_background_hover_color']),
72
+				'button_text_color'             => get_theme_mod('button_text_color', $colors['button_text_color']),
73
+				'button_text_color_hover'       => get_theme_mod('button_text_color_hover', $colors['button_text_color_hover']),
74
+				'button_shadow'                 => get_theme_mod('button_shadow', $colors['button_shadow']),
75
+			));
76 76
 		}
77 77
 
78 78
 		/**
@@ -80,22 +80,22 @@  discard block
 block discarded – undo
80 80
 		 *
81 81
 		 * @since 1.0.0
82 82
 		 */
83
-		function get_css( $colors ) {
83
+		function get_css($colors) {
84 84
 			global $customizer_colour_names;
85 85
 
86 86
 			$colors_template = array();
87 87
 
88
-			foreach ( $customizer_colour_names as $key => $value ) {
89
-				$colors_template[ $key ] = '';
88
+			foreach ($customizer_colour_names as $key => $value) {
89
+				$colors_template[$key] = '';
90 90
 			}
91 91
 
92
-			$colors = wp_parse_args( $colors, $colors_template );
92
+			$colors = wp_parse_args($colors, $colors_template);
93 93
 
94
-			if ( empty( $colors['button_text_color'] )
95
-				|| empty( $colors['button_text_color_hover'] )
96
-				|| empty( $colors['button_background_color'] )
97
-				|| empty( $colors['button_background_hover_color'] )
98
-				|| empty( $colors['button_shadow'] ) ) {
94
+			if (empty($colors['button_text_color'])
95
+				|| empty($colors['button_text_color_hover'])
96
+				|| empty($colors['button_background_color'])
97
+				|| empty($colors['button_background_hover_color'])
98
+				|| empty($colors['button_shadow'])) {
99 99
 				return '';
100 100
 			}
101 101
 
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
 				);
115 115
 			';
116 116
 
117
-			$css = apply_filters( 'lsx_customizer_colour_selectors_button', $css, $colors );
118
-			$css = parent::scss_to_css( $css );
117
+			$css = apply_filters('lsx_customizer_colour_selectors_button', $css, $colors);
118
+			$css = parent::scss_to_css($css);
119 119
 
120 120
 			return $css;
121 121
 		}
Please login to merge, or discard this patch.
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -1,105 +1,105 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! class_exists( 'LSX_Customizer_Colour_Button' ) ) {
3 3
 
4
-	/**
5
-	 * LSX Customizer Colour Button Class
6
-	 *
7
-	 * @package   LSX Customizer
8
-	 * @author    LightSpeed
9
-	 * @license   GPL3
10
-	 * @link
11
-	 * @copyright 2016 LightSpeed
12
-	 */
13
-	class LSX_Customizer_Colour_Button extends LSX_Customizer_Colour {
14
-
15
-		/**
16
-		 * Constructor.
17
-		 *
18
-		 * @since 1.0.0
19
-		 */
20
-		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
23
-
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
25
-		}
26
-
27
-		/**
28
-		 * Assign CSS to theme mod.
29
-		 *
30
-		 * @since 1.0.0
31
-		 */
32
-		public function set_theme_mod() {
33
-			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
35
-
36
-			set_theme_mod( 'lsx_customizer_colour__button_theme_mod', $styles );
37
-		}
38
-
39
-		/**
40
-		 * Enqueues front-end CSS.
41
-		 *
42
-		 * @since 1.0.0
43
-		 */
44
-		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__button_theme_mod' );
46
-
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
48
-				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
50
-
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__button_theme_mod', $styles );
53
-				}
54
-			} else {
55
-				$styles = $styles_from_theme_mod;
56
-			}
57
-
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
59
-		}
60
-
61
-		/**
62
-		 * Get CSS theme mods.
63
-		 *
64
-		 * @since 1.0.0
65
-		 */
66
-		public function get_theme_mods() {
67
-			$colors = parent::get_color_scheme();
68
-
69
-			return apply_filters( 'lsx_customizer_colours_button', array(
70
-				'button_background_color'       => get_theme_mod( 'button_background_color',       $colors['button_background_color'] ),
71
-				'button_background_hover_color' => get_theme_mod( 'button_background_hover_color', $colors['button_background_hover_color'] ),
72
-				'button_text_color'             => get_theme_mod( 'button_text_color',             $colors['button_text_color'] ),
73
-				'button_text_color_hover'       => get_theme_mod( 'button_text_color_hover',       $colors['button_text_color_hover'] ),
74
-				'button_shadow'                 => get_theme_mod( 'button_shadow',                 $colors['button_shadow'] ),
75
-			) );
76
-		}
77
-
78
-		/**
79
-		 * Returns CSS.
80
-		 *
81
-		 * @since 1.0.0
82
-		 */
83
-		function get_css( $colors ) {
84
-			global $customizer_colour_names;
85
-
86
-			$colors_template = array();
87
-
88
-			foreach ( $customizer_colour_names as $key => $value ) {
89
-				$colors_template[ $key ] = '';
90
-			}
91
-
92
-			$colors = wp_parse_args( $colors, $colors_template );
93
-
94
-			if ( empty( $colors['button_text_color'] )
95
-				|| empty( $colors['button_text_color_hover'] )
96
-				|| empty( $colors['button_background_color'] )
97
-				|| empty( $colors['button_background_hover_color'] )
98
-				|| empty( $colors['button_shadow'] ) ) {
99
-				return '';
100
-			}
101
-
102
-			$css = '
4
+     /**
5
+      * LSX Customizer Colour Button Class
6
+      *
7
+      * @package   LSX Customizer
8
+      * @author    LightSpeed
9
+      * @license   GPL3
10
+      * @link
11
+      * @copyright 2016 LightSpeed
12
+      */
13
+     class LSX_Customizer_Colour_Button extends LSX_Customizer_Colour {
14
+
15
+          /**
16
+           * Constructor.
17
+           *
18
+           * @since 1.0.0
19
+           */
20
+          public function __construct() {
21
+               add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
+               add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
23
+
24
+               add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
25
+          }
26
+
27
+          /**
28
+           * Assign CSS to theme mod.
29
+           *
30
+           * @since 1.0.0
31
+           */
32
+          public function set_theme_mod() {
33
+               $theme_mods = $this->get_theme_mods();
34
+               $styles     = $this->get_css( $theme_mods );
35
+
36
+               set_theme_mod( 'lsx_customizer_colour__button_theme_mod', $styles );
37
+          }
38
+
39
+          /**
40
+           * Enqueues front-end CSS.
41
+           *
42
+           * @since 1.0.0
43
+           */
44
+          public function enqueue_css() {
45
+               $styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__button_theme_mod' );
46
+
47
+               if ( is_customize_preview() || false === $styles_from_theme_mod ) {
48
+                    $theme_mods = $this->get_theme_mods();
49
+                    $styles     = $this->get_css( $theme_mods );
50
+
51
+                    if ( false === $styles_from_theme_mod ) {
52
+                         set_theme_mod( 'lsx_customizer_colour__button_theme_mod', $styles );
53
+                    }
54
+               } else {
55
+                    $styles = $styles_from_theme_mod;
56
+               }
57
+
58
+               wp_add_inline_style( 'lsx-customizer', $styles );
59
+          }
60
+
61
+          /**
62
+           * Get CSS theme mods.
63
+           *
64
+           * @since 1.0.0
65
+           */
66
+          public function get_theme_mods() {
67
+               $colors = parent::get_color_scheme();
68
+
69
+               return apply_filters( 'lsx_customizer_colours_button', array(
70
+                    'button_background_color'       => get_theme_mod( 'button_background_color',       $colors['button_background_color'] ),
71
+                    'button_background_hover_color' => get_theme_mod( 'button_background_hover_color', $colors['button_background_hover_color'] ),
72
+                    'button_text_color'             => get_theme_mod( 'button_text_color',             $colors['button_text_color'] ),
73
+                    'button_text_color_hover'       => get_theme_mod( 'button_text_color_hover',       $colors['button_text_color_hover'] ),
74
+                    'button_shadow'                 => get_theme_mod( 'button_shadow',                 $colors['button_shadow'] ),
75
+               ) );
76
+          }
77
+
78
+          /**
79
+           * Returns CSS.
80
+           *
81
+           * @since 1.0.0
82
+           */
83
+          function get_css( $colors ) {
84
+               global $customizer_colour_names;
85
+
86
+               $colors_template = array();
87
+
88
+               foreach ( $customizer_colour_names as $key => $value ) {
89
+                    $colors_template[ $key ] = '';
90
+               }
91
+
92
+               $colors = wp_parse_args( $colors, $colors_template );
93
+
94
+               if ( empty( $colors['button_text_color'] )
95
+                    || empty( $colors['button_text_color_hover'] )
96
+                    || empty( $colors['button_background_color'] )
97
+                    || empty( $colors['button_background_hover_color'] )
98
+                    || empty( $colors['button_shadow'] ) ) {
99
+                    return '';
100
+               }
101
+
102
+               $css = '
103 103
 				@import "' . get_template_directory() . '/assets/css/scss/global/mixins/button";
104 104
 
105 105
 				/**
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
 				);
115 115
 			';
116 116
 
117
-			$css = apply_filters( 'lsx_customizer_colour_selectors_button', $css, $colors );
118
-			$css = parent::scss_to_css( $css );
117
+               $css = apply_filters( 'lsx_customizer_colour_selectors_button', $css, $colors );
118
+               $css = parent::scss_to_css( $css );
119 119
 
120
-			return $css;
121
-		}
120
+               return $css;
121
+          }
122 122
 
123
-	}
123
+     }
124 124
 
125 125
 }
Please login to merge, or discard this patch.
classes/class-lsx-customizer-colour-footer.php 2 patches
Spacing   +28 added lines, -28 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_Footer' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Footer')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Footer Class
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 		 * @since 1.0.0
19 19
 		 */
20 20
 		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
21
+			add_action('after_switch_theme', array($this, 'set_theme_mod'));
22
+			add_action('customize_save_after', array($this, 'set_theme_mod'));
23 23
 
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
24
+			add_action('wp_enqueue_scripts', array($this, 'enqueue_css'), 2999);
25 25
 		}
26 26
 
27 27
 		/**
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 		 */
32 32
 		public function set_theme_mod() {
33 33
 			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
34
+			$styles     = $this->get_css($theme_mods);
35 35
 
36
-			set_theme_mod( 'lsx_customizer_colour__footer_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__footer_theme_mod', $styles);
37 37
 		}
38 38
 
39 39
 		/**
@@ -42,20 +42,20 @@  discard block
 block discarded – undo
42 42
 		 * @since 1.0.0
43 43
 		 */
44 44
 		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__footer_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__footer_theme_mod');
46 46
 
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
47
+			if (is_customize_preview() || false === $styles_from_theme_mod) {
48 48
 				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
49
+				$styles     = $this->get_css($theme_mods);
50 50
 
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__footer_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__footer_theme_mod', $styles);
53 53
 				}
54 54
 			} else {
55 55
 				$styles = $styles_from_theme_mod;
56 56
 			}
57 57
 
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
58
+			wp_add_inline_style('lsx-customizer', $styles);
59 59
 		}
60 60
 
61 61
 		/**
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 		public function get_theme_mods() {
67 67
 			$colors = parent::get_color_scheme();
68 68
 
69
-			return apply_filters( 'lsx_customizer_colours_footer', array(
70
-				'footer_background_color' => get_theme_mod( 'footer_background_color', $colors['footer_background_color'] ),
71
-				'footer_text_color'       => get_theme_mod( 'footer_text_color',       $colors['footer_text_color'] ),
72
-				'footer_link_color'       => get_theme_mod( 'footer_link_color',       $colors['footer_link_color'] ),
73
-				'footer_link_hover_color' => get_theme_mod( 'footer_link_hover_color', $colors['footer_link_hover_color'] ),
74
-			) );
69
+			return apply_filters('lsx_customizer_colours_footer', array(
70
+				'footer_background_color' => get_theme_mod('footer_background_color', $colors['footer_background_color']),
71
+				'footer_text_color'       => get_theme_mod('footer_text_color', $colors['footer_text_color']),
72
+				'footer_link_color'       => get_theme_mod('footer_link_color', $colors['footer_link_color']),
73
+				'footer_link_hover_color' => get_theme_mod('footer_link_hover_color', $colors['footer_link_hover_color']),
74
+			));
75 75
 		}
76 76
 
77 77
 		/**
@@ -79,21 +79,21 @@  discard block
 block discarded – undo
79 79
 		 *
80 80
 		 * @since 1.0.0
81 81
 		 */
82
-		function get_css( $colors ) {
82
+		function get_css($colors) {
83 83
 			global $customizer_colour_names;
84 84
 
85 85
 			$colors_template = array();
86 86
 
87
-			foreach ( $customizer_colour_names as $key => $value ) {
88
-				$colors_template[ $key ] = '';
87
+			foreach ($customizer_colour_names as $key => $value) {
88
+				$colors_template[$key] = '';
89 89
 			}
90 90
 
91
-			$colors = wp_parse_args( $colors, $colors_template );
91
+			$colors = wp_parse_args($colors, $colors_template);
92 92
 
93
-			if ( empty( $colors['footer_background_color'] )
94
-				|| empty( $colors['footer_text_color'] )
95
-				|| empty( $colors['footer_link_color'] )
96
-				|| empty( $colors['footer_link_hover_color'] ) ) {
93
+			if (empty($colors['footer_background_color'])
94
+				|| empty($colors['footer_text_color'])
95
+				|| empty($colors['footer_link_color'])
96
+				|| empty($colors['footer_link_hover_color'])) {
97 97
 				return '';
98 98
 			}
99 99
 
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 				);
112 112
 			';
113 113
 
114
-			$css = apply_filters( 'lsx_customizer_colour_selectors_footer', $css, $colors );
115
-			$css = parent::scss_to_css( $css );
114
+			$css = apply_filters('lsx_customizer_colour_selectors_footer', $css, $colors);
115
+			$css = parent::scss_to_css($css);
116 116
 
117 117
 			return $css;
118 118
 		}
Please login to merge, or discard this patch.
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -1,103 +1,103 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! class_exists( 'LSX_Customizer_Colour_Footer' ) ) {
3 3
 
4
-	/**
5
-	 * LSX Customizer Colour Footer Class
6
-	 *
7
-	 * @package   LSX Customizer
8
-	 * @author    LightSpeed
9
-	 * @license   GPL3
10
-	 * @link
11
-	 * @copyright 2016 LightSpeed
12
-	 */
13
-	class LSX_Customizer_Colour_Footer extends LSX_Customizer_Colour {
14
-
15
-		/**
16
-		 * Constructor.
17
-		 *
18
-		 * @since 1.0.0
19
-		 */
20
-		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
23
-
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
25
-		}
26
-
27
-		/**
28
-		 * Assign CSS to theme mod.
29
-		 *
30
-		 * @since 1.0.0
31
-		 */
32
-		public function set_theme_mod() {
33
-			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
35
-
36
-			set_theme_mod( 'lsx_customizer_colour__footer_theme_mod', $styles );
37
-		}
38
-
39
-		/**
40
-		 * Enqueues front-end CSS.
41
-		 *
42
-		 * @since 1.0.0
43
-		 */
44
-		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__footer_theme_mod' );
46
-
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
48
-				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
50
-
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__footer_theme_mod', $styles );
53
-				}
54
-			} else {
55
-				$styles = $styles_from_theme_mod;
56
-			}
57
-
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
59
-		}
60
-
61
-		/**
62
-		 * Get CSS theme mods.
63
-		 *
64
-		 * @since 1.0.0
65
-		 */
66
-		public function get_theme_mods() {
67
-			$colors = parent::get_color_scheme();
68
-
69
-			return apply_filters( 'lsx_customizer_colours_footer', array(
70
-				'footer_background_color' => get_theme_mod( 'footer_background_color', $colors['footer_background_color'] ),
71
-				'footer_text_color'       => get_theme_mod( 'footer_text_color',       $colors['footer_text_color'] ),
72
-				'footer_link_color'       => get_theme_mod( 'footer_link_color',       $colors['footer_link_color'] ),
73
-				'footer_link_hover_color' => get_theme_mod( 'footer_link_hover_color', $colors['footer_link_hover_color'] ),
74
-			) );
75
-		}
76
-
77
-		/**
78
-		 * Returns CSS.
79
-		 *
80
-		 * @since 1.0.0
81
-		 */
82
-		function get_css( $colors ) {
83
-			global $customizer_colour_names;
84
-
85
-			$colors_template = array();
86
-
87
-			foreach ( $customizer_colour_names as $key => $value ) {
88
-				$colors_template[ $key ] = '';
89
-			}
90
-
91
-			$colors = wp_parse_args( $colors, $colors_template );
92
-
93
-			if ( empty( $colors['footer_background_color'] )
94
-				|| empty( $colors['footer_text_color'] )
95
-				|| empty( $colors['footer_link_color'] )
96
-				|| empty( $colors['footer_link_hover_color'] ) ) {
97
-				return '';
98
-			}
99
-
100
-			$css = '
4
+     /**
5
+      * LSX Customizer Colour Footer Class
6
+      *
7
+      * @package   LSX Customizer
8
+      * @author    LightSpeed
9
+      * @license   GPL3
10
+      * @link
11
+      * @copyright 2016 LightSpeed
12
+      */
13
+     class LSX_Customizer_Colour_Footer extends LSX_Customizer_Colour {
14
+
15
+          /**
16
+           * Constructor.
17
+           *
18
+           * @since 1.0.0
19
+           */
20
+          public function __construct() {
21
+               add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
+               add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
23
+
24
+               add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
25
+          }
26
+
27
+          /**
28
+           * Assign CSS to theme mod.
29
+           *
30
+           * @since 1.0.0
31
+           */
32
+          public function set_theme_mod() {
33
+               $theme_mods = $this->get_theme_mods();
34
+               $styles     = $this->get_css( $theme_mods );
35
+
36
+               set_theme_mod( 'lsx_customizer_colour__footer_theme_mod', $styles );
37
+          }
38
+
39
+          /**
40
+           * Enqueues front-end CSS.
41
+           *
42
+           * @since 1.0.0
43
+           */
44
+          public function enqueue_css() {
45
+               $styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__footer_theme_mod' );
46
+
47
+               if ( is_customize_preview() || false === $styles_from_theme_mod ) {
48
+                    $theme_mods = $this->get_theme_mods();
49
+                    $styles     = $this->get_css( $theme_mods );
50
+
51
+                    if ( false === $styles_from_theme_mod ) {
52
+                         set_theme_mod( 'lsx_customizer_colour__footer_theme_mod', $styles );
53
+                    }
54
+               } else {
55
+                    $styles = $styles_from_theme_mod;
56
+               }
57
+
58
+               wp_add_inline_style( 'lsx-customizer', $styles );
59
+          }
60
+
61
+          /**
62
+           * Get CSS theme mods.
63
+           *
64
+           * @since 1.0.0
65
+           */
66
+          public function get_theme_mods() {
67
+               $colors = parent::get_color_scheme();
68
+
69
+               return apply_filters( 'lsx_customizer_colours_footer', array(
70
+                    'footer_background_color' => get_theme_mod( 'footer_background_color', $colors['footer_background_color'] ),
71
+                    'footer_text_color'       => get_theme_mod( 'footer_text_color',       $colors['footer_text_color'] ),
72
+                    'footer_link_color'       => get_theme_mod( 'footer_link_color',       $colors['footer_link_color'] ),
73
+                    'footer_link_hover_color' => get_theme_mod( 'footer_link_hover_color', $colors['footer_link_hover_color'] ),
74
+               ) );
75
+          }
76
+
77
+          /**
78
+           * Returns CSS.
79
+           *
80
+           * @since 1.0.0
81
+           */
82
+          function get_css( $colors ) {
83
+               global $customizer_colour_names;
84
+
85
+               $colors_template = array();
86
+
87
+               foreach ( $customizer_colour_names as $key => $value ) {
88
+                    $colors_template[ $key ] = '';
89
+               }
90
+
91
+               $colors = wp_parse_args( $colors, $colors_template );
92
+
93
+               if ( empty( $colors['footer_background_color'] )
94
+                    || empty( $colors['footer_text_color'] )
95
+                    || empty( $colors['footer_link_color'] )
96
+                    || empty( $colors['footer_link_hover_color'] ) ) {
97
+                    return '';
98
+               }
99
+
100
+               $css = '
101 101
 				@import "' . get_template_directory() . '/assets/css/scss/global/mixins/footer";
102 102
 
103 103
 				/**
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 				);
112 112
 			';
113 113
 
114
-			$css = apply_filters( 'lsx_customizer_colour_selectors_footer', $css, $colors );
115
-			$css = parent::scss_to_css( $css );
114
+               $css = apply_filters( 'lsx_customizer_colour_selectors_footer', $css, $colors );
115
+               $css = parent::scss_to_css( $css );
116 116
 
117
-			return $css;
118
-		}
117
+               return $css;
118
+          }
119 119
 
120
-	}
120
+     }
121 121
 
122 122
 }
Please login to merge, or discard this patch.
classes/class-lsx-customizer-colour-button-secondary.php 2 patches
Spacing   +30 added lines, -30 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_Button_Secondary' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Button_Secondary')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Button Secondary Class
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 		 * @since 1.0.0
19 19
 		 */
20 20
 		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
21
+			add_action('after_switch_theme', array($this, 'set_theme_mod'));
22
+			add_action('customize_save_after', array($this, 'set_theme_mod'));
23 23
 
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
24
+			add_action('wp_enqueue_scripts', array($this, 'enqueue_css'), 2999);
25 25
 		}
26 26
 
27 27
 		/**
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 		 */
32 32
 		public function set_theme_mod() {
33 33
 			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
34
+			$styles     = $this->get_css($theme_mods);
35 35
 
36
-			set_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__button_secondary_theme_mod', $styles);
37 37
 		}
38 38
 
39 39
 		/**
@@ -42,20 +42,20 @@  discard block
 block discarded – undo
42 42
 		 * @since 1.0.0
43 43
 		 */
44 44
 		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__button_secondary_theme_mod');
46 46
 
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
47
+			if (is_customize_preview() || false === $styles_from_theme_mod) {
48 48
 				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
49
+				$styles     = $this->get_css($theme_mods);
50 50
 
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__button_secondary_theme_mod', $styles);
53 53
 				}
54 54
 			} else {
55 55
 				$styles = $styles_from_theme_mod;
56 56
 			}
57 57
 
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
58
+			wp_add_inline_style('lsx-customizer', $styles);
59 59
 		}
60 60
 
61 61
 		/**
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 		public function get_theme_mods() {
67 67
 			$colors = parent::get_color_scheme();
68 68
 
69
-			return apply_filters( 'lsx_customizer_colours_button_secondary', array(
70
-				'button_secondary_background_color'       => get_theme_mod( 'button_secondary_background_color',       $colors['button_secondary_background_color'] ),
71
-				'button_secondary_background_hover_color' => get_theme_mod( 'button_secondary_background_hover_color', $colors['button_secondary_background_hover_color'] ),
72
-				'button_secondary_text_color'             => get_theme_mod( 'button_secondary_text_color',             $colors['button_secondary_text_color'] ),
73
-				'button_secondary_text_color_hover'       => get_theme_mod( 'button_secondary_text_color_hover',       $colors['button_secondary_text_color_hover'] ),
74
-				'button_secondary_shadow'                 => get_theme_mod( 'button_secondary_shadow',                 $colors['button_secondary_shadow'] ),
75
-			) );
69
+			return apply_filters('lsx_customizer_colours_button_secondary', array(
70
+				'button_secondary_background_color'       => get_theme_mod('button_secondary_background_color', $colors['button_secondary_background_color']),
71
+				'button_secondary_background_hover_color' => get_theme_mod('button_secondary_background_hover_color', $colors['button_secondary_background_hover_color']),
72
+				'button_secondary_text_color'             => get_theme_mod('button_secondary_text_color', $colors['button_secondary_text_color']),
73
+				'button_secondary_text_color_hover'       => get_theme_mod('button_secondary_text_color_hover', $colors['button_secondary_text_color_hover']),
74
+				'button_secondary_shadow'                 => get_theme_mod('button_secondary_shadow', $colors['button_secondary_shadow']),
75
+			));
76 76
 		}
77 77
 
78 78
 		/**
@@ -80,22 +80,22 @@  discard block
 block discarded – undo
80 80
 		 *
81 81
 		 * @since 1.0.0
82 82
 		 */
83
-		function get_css( $colors ) {
83
+		function get_css($colors) {
84 84
 			global $customizer_colour_names;
85 85
 
86 86
 			$colors_template = array();
87 87
 
88
-			foreach ( $customizer_colour_names as $key => $value ) {
89
-				$colors_template[ $key ] = '';
88
+			foreach ($customizer_colour_names as $key => $value) {
89
+				$colors_template[$key] = '';
90 90
 			}
91 91
 
92
-			$colors = wp_parse_args( $colors, $colors_template );
92
+			$colors = wp_parse_args($colors, $colors_template);
93 93
 
94
-			if ( empty( $colors['button_secondary_text_color'] )
95
-				|| empty( $colors['button_secondary_text_color_hover'] )
96
-				|| empty( $colors['button_secondary_background_color'] )
97
-				|| empty( $colors['button_secondary_background_hover_color'] )
98
-				|| empty( $colors['button_secondary_shadow'] ) ) {
94
+			if (empty($colors['button_secondary_text_color'])
95
+				|| empty($colors['button_secondary_text_color_hover'])
96
+				|| empty($colors['button_secondary_background_color'])
97
+				|| empty($colors['button_secondary_background_hover_color'])
98
+				|| empty($colors['button_secondary_shadow'])) {
99 99
 				return '';
100 100
 			}
101 101
 
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
 				);
115 115
 			';
116 116
 
117
-			$css = apply_filters( 'lsx_customizer_colour_selectors_button_secondary', $css, $colors );
118
-			$css = parent::scss_to_css( $css );
117
+			$css = apply_filters('lsx_customizer_colour_selectors_button_secondary', $css, $colors);
118
+			$css = parent::scss_to_css($css);
119 119
 
120 120
 			return $css;
121 121
 		}
Please login to merge, or discard this patch.
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -1,105 +1,105 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! class_exists( 'LSX_Customizer_Colour_Button_Secondary' ) ) {
3 3
 
4
-	/**
5
-	 * LSX Customizer Colour Button Secondary Class
6
-	 *
7
-	 * @package   LSX Customizer
8
-	 * @author    LightSpeed
9
-	 * @license   GPL3
10
-	 * @link
11
-	 * @copyright 2016 LightSpeed
12
-	 */
13
-	class LSX_Customizer_Colour_Button_Secondary extends LSX_Customizer_Colour {
14
-
15
-		/**
16
-		 * Constructor.
17
-		 *
18
-		 * @since 1.0.0
19
-		 */
20
-		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
23
-
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
25
-		}
26
-
27
-		/**
28
-		 * Assign CSS to theme mod.
29
-		 *
30
-		 * @since 1.0.0
31
-		 */
32
-		public function set_theme_mod() {
33
-			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
35
-
36
-			set_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod', $styles );
37
-		}
38
-
39
-		/**
40
-		 * Enqueues front-end CSS.
41
-		 *
42
-		 * @since 1.0.0
43
-		 */
44
-		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod' );
46
-
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
48
-				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
50
-
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod', $styles );
53
-				}
54
-			} else {
55
-				$styles = $styles_from_theme_mod;
56
-			}
57
-
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
59
-		}
60
-
61
-		/**
62
-		 * Get CSS theme mods.
63
-		 *
64
-		 * @since 1.0.0
65
-		 */
66
-		public function get_theme_mods() {
67
-			$colors = parent::get_color_scheme();
68
-
69
-			return apply_filters( 'lsx_customizer_colours_button_secondary', array(
70
-				'button_secondary_background_color'       => get_theme_mod( 'button_secondary_background_color',       $colors['button_secondary_background_color'] ),
71
-				'button_secondary_background_hover_color' => get_theme_mod( 'button_secondary_background_hover_color', $colors['button_secondary_background_hover_color'] ),
72
-				'button_secondary_text_color'             => get_theme_mod( 'button_secondary_text_color',             $colors['button_secondary_text_color'] ),
73
-				'button_secondary_text_color_hover'       => get_theme_mod( 'button_secondary_text_color_hover',       $colors['button_secondary_text_color_hover'] ),
74
-				'button_secondary_shadow'                 => get_theme_mod( 'button_secondary_shadow',                 $colors['button_secondary_shadow'] ),
75
-			) );
76
-		}
77
-
78
-		/**
79
-		 * Returns CSS.
80
-		 *
81
-		 * @since 1.0.0
82
-		 */
83
-		function get_css( $colors ) {
84
-			global $customizer_colour_names;
85
-
86
-			$colors_template = array();
87
-
88
-			foreach ( $customizer_colour_names as $key => $value ) {
89
-				$colors_template[ $key ] = '';
90
-			}
91
-
92
-			$colors = wp_parse_args( $colors, $colors_template );
93
-
94
-			if ( empty( $colors['button_secondary_text_color'] )
95
-				|| empty( $colors['button_secondary_text_color_hover'] )
96
-				|| empty( $colors['button_secondary_background_color'] )
97
-				|| empty( $colors['button_secondary_background_hover_color'] )
98
-				|| empty( $colors['button_secondary_shadow'] ) ) {
99
-				return '';
100
-			}
101
-
102
-			$css = '
4
+     /**
5
+      * LSX Customizer Colour Button Secondary Class
6
+      *
7
+      * @package   LSX Customizer
8
+      * @author    LightSpeed
9
+      * @license   GPL3
10
+      * @link
11
+      * @copyright 2016 LightSpeed
12
+      */
13
+     class LSX_Customizer_Colour_Button_Secondary extends LSX_Customizer_Colour {
14
+
15
+          /**
16
+           * Constructor.
17
+           *
18
+           * @since 1.0.0
19
+           */
20
+          public function __construct() {
21
+               add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
+               add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
23
+
24
+               add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
25
+          }
26
+
27
+          /**
28
+           * Assign CSS to theme mod.
29
+           *
30
+           * @since 1.0.0
31
+           */
32
+          public function set_theme_mod() {
33
+               $theme_mods = $this->get_theme_mods();
34
+               $styles     = $this->get_css( $theme_mods );
35
+
36
+               set_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod', $styles );
37
+          }
38
+
39
+          /**
40
+           * Enqueues front-end CSS.
41
+           *
42
+           * @since 1.0.0
43
+           */
44
+          public function enqueue_css() {
45
+               $styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod' );
46
+
47
+               if ( is_customize_preview() || false === $styles_from_theme_mod ) {
48
+                    $theme_mods = $this->get_theme_mods();
49
+                    $styles     = $this->get_css( $theme_mods );
50
+
51
+                    if ( false === $styles_from_theme_mod ) {
52
+                         set_theme_mod( 'lsx_customizer_colour__button_secondary_theme_mod', $styles );
53
+                    }
54
+               } else {
55
+                    $styles = $styles_from_theme_mod;
56
+               }
57
+
58
+               wp_add_inline_style( 'lsx-customizer', $styles );
59
+          }
60
+
61
+          /**
62
+           * Get CSS theme mods.
63
+           *
64
+           * @since 1.0.0
65
+           */
66
+          public function get_theme_mods() {
67
+               $colors = parent::get_color_scheme();
68
+
69
+               return apply_filters( 'lsx_customizer_colours_button_secondary', array(
70
+                    'button_secondary_background_color'       => get_theme_mod( 'button_secondary_background_color',       $colors['button_secondary_background_color'] ),
71
+                    'button_secondary_background_hover_color' => get_theme_mod( 'button_secondary_background_hover_color', $colors['button_secondary_background_hover_color'] ),
72
+                    'button_secondary_text_color'             => get_theme_mod( 'button_secondary_text_color',             $colors['button_secondary_text_color'] ),
73
+                    'button_secondary_text_color_hover'       => get_theme_mod( 'button_secondary_text_color_hover',       $colors['button_secondary_text_color_hover'] ),
74
+                    'button_secondary_shadow'                 => get_theme_mod( 'button_secondary_shadow',                 $colors['button_secondary_shadow'] ),
75
+               ) );
76
+          }
77
+
78
+          /**
79
+           * Returns CSS.
80
+           *
81
+           * @since 1.0.0
82
+           */
83
+          function get_css( $colors ) {
84
+               global $customizer_colour_names;
85
+
86
+               $colors_template = array();
87
+
88
+               foreach ( $customizer_colour_names as $key => $value ) {
89
+                    $colors_template[ $key ] = '';
90
+               }
91
+
92
+               $colors = wp_parse_args( $colors, $colors_template );
93
+
94
+               if ( empty( $colors['button_secondary_text_color'] )
95
+                    || empty( $colors['button_secondary_text_color_hover'] )
96
+                    || empty( $colors['button_secondary_background_color'] )
97
+                    || empty( $colors['button_secondary_background_hover_color'] )
98
+                    || empty( $colors['button_secondary_shadow'] ) ) {
99
+                    return '';
100
+               }
101
+
102
+               $css = '
103 103
 				@import "' . get_template_directory() . '/assets/css/scss/global/mixins/button";
104 104
 
105 105
 				/**
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
 				);
115 115
 			';
116 116
 
117
-			$css = apply_filters( 'lsx_customizer_colour_selectors_button_secondary', $css, $colors );
118
-			$css = parent::scss_to_css( $css );
117
+               $css = apply_filters( 'lsx_customizer_colour_selectors_button_secondary', $css, $colors );
118
+               $css = parent::scss_to_css( $css );
119 119
 
120
-			return $css;
121
-		}
120
+               return $css;
121
+          }
122 122
 
123
-	}
123
+     }
124 124
 
125 125
 }
Please login to merge, or discard this patch.
includes/lsx-customizer-colour-deprecated.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
 /**
13 13
  * Converts a HEX value to RGB.
14 14
  */
15
-function lsx_customizer_colour__hex2rgb( $color ) {
16
-	return LSX_Customizer_Colour::hex2rgb( $color );
15
+function lsx_customizer_colour__hex2rgb($color) {
16
+	return LSX_Customizer_Colour::hex2rgb($color);
17 17
 }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,5 +13,5 @@
 block discarded – undo
13 13
  * Converts a HEX value to RGB.
14 14
  */
15 15
 function lsx_customizer_colour__hex2rgb( $color ) {
16
-	return LSX_Customizer_Colour::hex2rgb( $color );
16
+     return LSX_Customizer_Colour::hex2rgb( $color );
17 17
 }
Please login to merge, or discard this patch.
examples/lsx-customizer-colour.php 2 patches
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.
Indentation   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
  * Add two new colors (test) in main array of colors
7 7
  */
8 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
-	return $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
+     return $array;
12 12
 }
13 13
 add_filter( 'lsx_customizer_colour_names', 'test_lsx_customizer_colour_names' );
14 14
 
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
  * Add the new colors (test) in default scheme
19 19
  */
20 20
 function test_lsx_customizer_colour_choices_default( $array ) {
21
-	$array['test_text_color']       = '#ddddd1';
22
-	$array['test_text_color_hover'] = '#eeeee1';
23
-	return $array;
21
+     $array['test_text_color']       = '#ddddd1';
22
+     $array['test_text_color_hover'] = '#eeeee1';
23
+     return $array;
24 24
 }
25 25
 add_filter( 'lsx_customizer_colour_choices_default', 'test_lsx_customizer_colour_choices_default' );
26 26
 
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
  * Add the new colors (test) in red scheme
31 31
  */
32 32
 function test_lsx_customizer_colour_choices_red( $array ) {
33
-	$array['test_text_color']       = '#ddddd2';
34
-	$array['test_text_color_hover'] = '#eeeee2';
35
-	return $array;
33
+     $array['test_text_color']       = '#ddddd2';
34
+     $array['test_text_color_hover'] = '#eeeee2';
35
+     return $array;
36 36
 }
37 37
 add_filter( 'lsx_customizer_colour_choices_red', 'test_lsx_customizer_colour_choices_red' );
38 38
 
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
  * Add the new colors (test) in orange scheme
43 43
  */
44 44
 function test_lsx_customizer_colour_choices_orange( $array ) {
45
-	$array['test_text_color']       = '#ddddd3';
46
-	$array['test_text_color_hover'] = '#eeeee3';
47
-	return $array;
45
+     $array['test_text_color']       = '#ddddd3';
46
+     $array['test_text_color_hover'] = '#eeeee3';
47
+     return $array;
48 48
 }
49 49
 add_filter( 'lsx_customizer_colour_choices_orange', 'test_lsx_customizer_colour_choices_orange' );
50 50
 
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
  * Add the new colors (test) in green scheme
55 55
  */
56 56
 function test_lsx_customizer_colour_choices_green( $array ) {
57
-	$array['test_text_color']       = '#ddddd4';
58
-	$array['test_text_color_hover'] = '#eeeee4';
59
-	return $array;
57
+     $array['test_text_color']       = '#ddddd4';
58
+     $array['test_text_color_hover'] = '#eeeee4';
59
+     return $array;
60 60
 }
61 61
 add_filter( 'lsx_customizer_colour_choices_green', 'test_lsx_customizer_colour_choices_green' );
62 62
 
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
  * Add the new colors (test) in brown scheme
67 67
  */
68 68
 function test_lsx_customizer_colour_choices_brown( $array ) {
69
-	$array['test_text_color']       = '#ddddd5';
70
-	$array['test_text_color_hover'] = '#eeeee5';
71
-	return $array;
69
+     $array['test_text_color']       = '#ddddd5';
70
+     $array['test_text_color_hover'] = '#eeeee5';
71
+     return $array;
72 72
 }
73 73
 add_filter( 'lsx_customizer_colour_choices_brown', 'test_lsx_customizer_colour_choices_brown' );
74 74
 
@@ -79,88 +79,88 @@  discard block
 block discarded – undo
79 79
  * Also add the new colors (test) in new scheme
80 80
  */
81 81
 function test_lsx_customizer_colour_choices( $array ) {
82
-	$array['test'] = array(
83
-		'label'  => esc_html__( 'Test', 'lsx-customizer' ),
84
-		'colors' => array(
85
-			'button_background_color'       => '#428bca',
86
-			'button_background_hover_color' => '#2a6496',
87
-			'button_text_color'             => '#ffffff',
88
-			'button_text_color_hover'       => '#ffffff',
89
-			'button_shadow'                 => '#2a6496',
90
-
91
-			'button_cta_background_color'       => '#f7941d',
92
-			'button_cta_background_hover_color' => '#f7741d',
93
-			'button_cta_text_color'             => '#ffffff',
94
-			'button_cta_text_color_hover'       => '#ffffff',
95
-			'button_cta_shadow'                 => '#f7741d',
96
-
97
-			'top_menu_background_color'          => '#333333',
98
-			'top_menu_link_color'                => '#ffffff',
99
-			'top_menu_link_hover_color'          => '#428bca',
100
-			'top_menu_icon_color'                => '#428bca',
101
-			'top_menu_icon_hover_color'          => '#ffffff',
102
-			'top_menu_dropdown_color'            => '#333333',
103
-			'top_menu_dropdown_hover_color'      => '#444444',
104
-			'top_menu_dropdown_link_color'       => '#ffffff',
105
-			'top_menu_dropdown_link_hover_color' => '#428bca',
106
-
107
-			'header_background_color'  => '#ffffff',
108
-			'header_link_color'        => '#428bca',
109
-			'header_link_hover_color'  => '#1072c9',
110
-			'header_description_color' => '#555555',
111
-
112
-			'main_menu_background_color'                => '#ffffff',
113
-			'main_menu_link_color'                      => '#555555',
114
-			'main_menu_link_hover_color'                => '#ffffff',
115
-			'main_menu_dropdown_background_color'       => '#428bca',
116
-			'main_menu_dropdown_background_hover_color' => '#1072c9',
117
-			'main_menu_dropdown_link_color'             => '#ffffff',
118
-			'main_menu_dropdown_link_hover_color'       => '#dddddd',
119
-
120
-			'banner_background_color'               => '#2a6496',
121
-			'banner_text_color'                     => '#ffffff',
122
-			'banner_text_image_color'               => '#ffffff',
123
-			'banner_breadcrumb_background_color'    => '#374750',
124
-			'banner_breadcrumb_text_color'          => '#919191',
125
-			'banner_breadcrumb_text_selected_color' => '#ffffff',
126
-
127
-			'background_color'                       => '#ffffff',
128
-			'body_line_color'                        => '#dddddd',
129
-			'body_text_heading_color'                => '#333333',
130
-			'body_text_small_color'                  => '#919191',
131
-			'body_text_color'                        => '#333333',
132
-			'body_link_color'                        => '#596b46',
133
-			'body_link_hover_color'                  => '#3d4a30',
134
-			'body_section_full_background_color'     => '#596b46',
135
-			'body_section_full_text_color'           => '#ffffff',
136
-			'body_section_full_link_color'           => '#eeeeee',
137
-			'body_section_full_link_hover_color'     => '#dddddd',
138
-			'body_section_full_cta_background_color' => '#333333',
139
-			'body_section_full_cta_text_color'       => '#ffffff',
140
-			'body_section_full_cta_link_color'       => '#eeeeee',
141
-			'body_section_full_cta_link_hover_color' => '#dddddd',
142
-
143
-			'footer_cta_background_color' => '#428bca',
144
-			'footer_cta_text_color'       => '#ffffff',
145
-			'footer_cta_link_color'       => '#dddddd',
146
-			'footer_cta_link_hover_color' => '#ffffff',
147
-
148
-			'footer_widgets_background_color' => '#333333',
149
-			'footer_widgets_text_color'       => '#eeeeee',
150
-			'footer_widgets_link_color'       => '#428bca',
151
-			'footer_widgets_link_hover_color' => '#1072c9',
152
-
153
-			'footer_background_color' => '#232222',
154
-			'footer_text_color'       => '#ffffff',
155
-			'footer_link_color'       => '#428bca',
156
-			'footer_link_hover_color' => '#1072c9',
157
-
158
-			'test_text_color'       => '#ddddd6',
159
-			'test_text_color_hover' => '#eeeee6',
160
-		),
161
-	);
162
-
163
-	return $array;
82
+     $array['test'] = array(
83
+          'label'  => esc_html__( 'Test', 'lsx-customizer' ),
84
+          'colors' => array(
85
+               'button_background_color'       => '#428bca',
86
+               'button_background_hover_color' => '#2a6496',
87
+               'button_text_color'             => '#ffffff',
88
+               'button_text_color_hover'       => '#ffffff',
89
+               'button_shadow'                 => '#2a6496',
90
+
91
+               'button_cta_background_color'       => '#f7941d',
92
+               'button_cta_background_hover_color' => '#f7741d',
93
+               'button_cta_text_color'             => '#ffffff',
94
+               'button_cta_text_color_hover'       => '#ffffff',
95
+               'button_cta_shadow'                 => '#f7741d',
96
+
97
+               'top_menu_background_color'          => '#333333',
98
+               'top_menu_link_color'                => '#ffffff',
99
+               'top_menu_link_hover_color'          => '#428bca',
100
+               'top_menu_icon_color'                => '#428bca',
101
+               'top_menu_icon_hover_color'          => '#ffffff',
102
+               'top_menu_dropdown_color'            => '#333333',
103
+               'top_menu_dropdown_hover_color'      => '#444444',
104
+               'top_menu_dropdown_link_color'       => '#ffffff',
105
+               'top_menu_dropdown_link_hover_color' => '#428bca',
106
+
107
+               'header_background_color'  => '#ffffff',
108
+               'header_link_color'        => '#428bca',
109
+               'header_link_hover_color'  => '#1072c9',
110
+               'header_description_color' => '#555555',
111
+
112
+               'main_menu_background_color'                => '#ffffff',
113
+               'main_menu_link_color'                      => '#555555',
114
+               'main_menu_link_hover_color'                => '#ffffff',
115
+               'main_menu_dropdown_background_color'       => '#428bca',
116
+               'main_menu_dropdown_background_hover_color' => '#1072c9',
117
+               'main_menu_dropdown_link_color'             => '#ffffff',
118
+               'main_menu_dropdown_link_hover_color'       => '#dddddd',
119
+
120
+               'banner_background_color'               => '#2a6496',
121
+               'banner_text_color'                     => '#ffffff',
122
+               'banner_text_image_color'               => '#ffffff',
123
+               'banner_breadcrumb_background_color'    => '#374750',
124
+               'banner_breadcrumb_text_color'          => '#919191',
125
+               'banner_breadcrumb_text_selected_color' => '#ffffff',
126
+
127
+               'background_color'                       => '#ffffff',
128
+               'body_line_color'                        => '#dddddd',
129
+               'body_text_heading_color'                => '#333333',
130
+               'body_text_small_color'                  => '#919191',
131
+               'body_text_color'                        => '#333333',
132
+               'body_link_color'                        => '#596b46',
133
+               'body_link_hover_color'                  => '#3d4a30',
134
+               'body_section_full_background_color'     => '#596b46',
135
+               'body_section_full_text_color'           => '#ffffff',
136
+               'body_section_full_link_color'           => '#eeeeee',
137
+               'body_section_full_link_hover_color'     => '#dddddd',
138
+               'body_section_full_cta_background_color' => '#333333',
139
+               'body_section_full_cta_text_color'       => '#ffffff',
140
+               'body_section_full_cta_link_color'       => '#eeeeee',
141
+               'body_section_full_cta_link_hover_color' => '#dddddd',
142
+
143
+               'footer_cta_background_color' => '#428bca',
144
+               'footer_cta_text_color'       => '#ffffff',
145
+               'footer_cta_link_color'       => '#dddddd',
146
+               'footer_cta_link_hover_color' => '#ffffff',
147
+
148
+               'footer_widgets_background_color' => '#333333',
149
+               'footer_widgets_text_color'       => '#eeeeee',
150
+               'footer_widgets_link_color'       => '#428bca',
151
+               'footer_widgets_link_hover_color' => '#1072c9',
152
+
153
+               'footer_background_color' => '#232222',
154
+               'footer_text_color'       => '#ffffff',
155
+               'footer_link_color'       => '#428bca',
156
+               'footer_link_hover_color' => '#1072c9',
157
+
158
+               'test_text_color'       => '#ddddd6',
159
+               'test_text_color_hover' => '#eeeee6',
160
+          ),
161
+     );
162
+
163
+     return $array;
164 164
 }
165 165
 add_filter( 'lsx_customizer_colour_choices', 'test_lsx_customizer_colour_choices' );
166 166
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
  * Add new selectors in "button" group of colours
171 171
  */
172 172
 function test_lsx_customizer_colour_selectors_button( $css, $colors ) {
173
-	$css .= <<<CSS
173
+     $css .= <<<CSS
174 174
 
175 175
 	/* Button TEST */
176 176
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	}
184 184
 CSS;
185 185
 
186
-	return $css;
186
+     return $css;
187 187
 }
188 188
 add_filter( 'lsx_customizer_colour_selectors_button', 'test_lsx_customizer_colour_selectors_button', 10, 2 );
189 189
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
  * Add new selectors in "button cta" group of colours
194 194
  */
195 195
 function test_lsx_customizer_colour_selectors_button_cta( $css, $colors ) {
196
-	$css .= <<<CSS
196
+     $css .= <<<CSS
197 197
 
198 198
 	/* Button CTA TEST */
199 199
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	}
207 207
 CSS;
208 208
 
209
-	return $css;
209
+     return $css;
210 210
 }
211 211
 add_filter( 'lsx_customizer_colour_selectors_button_cta', 'test_lsx_customizer_colour_selectors_button_cta', 10, 2 );
212 212
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
  * Add new selectors in "top menu" group of colours
217 217
  */
218 218
 function test_lsx_customizer_colour_selectors_top_menu( $css, $colors ) {
219
-	$css .= <<<CSS
219
+     $css .= <<<CSS
220 220
 
221 221
 	/* Top Menu TEST */
222 222
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	}
234 234
 CSS;
235 235
 
236
-	return $css;
236
+     return $css;
237 237
 }
238 238
 add_filter( 'lsx_customizer_colour_selectors_top_menu', 'test_lsx_customizer_colour_selectors_top_menu', 10, 2 );
239 239
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
  * Add new selectors in "header" group of colours
244 244
  */
245 245
 function test_lsx_customizer_colour_selectors_header( $css, $colors ) {
246
-	$css .= <<<CSS
246
+     $css .= <<<CSS
247 247
 
248 248
 	/* Header TEST */
249 249
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	}
256 256
 CSS;
257 257
 
258
-	return $css;
258
+     return $css;
259 259
 }
260 260
 add_filter( 'lsx_customizer_colour_selectors_header', 'test_lsx_customizer_colour_selectors_header', 10, 2 );
261 261
 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
  * Add new selectors in "main meun" group of colours
266 266
  */
267 267
 function test_lsx_customizer_colour_selectors_main_menu( $css, $colors ) {
268
-	$css .= <<<CSS
268
+     $css .= <<<CSS
269 269
 
270 270
 	/* Main Menu TEST */
271 271
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	}
281 281
 CSS;
282 282
 
283
-	return $css;
283
+     return $css;
284 284
 }
285 285
 add_filter( 'lsx_customizer_colour_selectors_main_menu', 'test_lsx_customizer_colour_selectors_main_menu', 10, 2 );
286 286
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
  * Add new selectors in "banner" group of colours
291 291
  */
292 292
 function test_lsx_customizer_colour_selectors_banner( $css, $colors ) {
293
-	$css .= <<<CSS
293
+     $css .= <<<CSS
294 294
 
295 295
 	/* Banner TEST */
296 296
 
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 	}
305 305
 CSS;
306 306
 
307
-	return $css;
307
+     return $css;
308 308
 }
309 309
 add_filter( 'lsx_customizer_colour_selectors_banner', 'test_lsx_customizer_colour_selectors_banner', 10, 2 );
310 310
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
  * Add new selectors in "body" group of colours
315 315
  */
316 316
 function test_lsx_customizer_colour_selectors_body( $css, $colors ) {
317
-	$css .= <<<CSS
317
+     $css .= <<<CSS
318 318
 
319 319
 	/* Body TEST */
320 320
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	}
339 339
 CSS;
340 340
 
341
-	return $css;
341
+     return $css;
342 342
 }
343 343
 add_filter( 'lsx_customizer_colour_selectors_body', 'test_lsx_customizer_colour_selectors_body', 10, 2 );
344 344
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
  * Add new selectors in "footer cta" group of colours
349 349
  */
350 350
 function test_lsx_customizer_colour_selectors_footer_cta( $css, $colors ) {
351
-	$css .= <<<CSS
351
+     $css .= <<<CSS
352 352
 
353 353
 	/* Footer CTA TEST */
354 354
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 	}
361 361
 CSS;
362 362
 
363
-	return $css;
363
+     return $css;
364 364
 }
365 365
 add_filter( 'lsx_customizer_colour_selectors_footer_cta', 'test_lsx_customizer_colour_selectors_footer_cta', 10, 2 );
366 366
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
  * Add new selectors in "footer widgets" group of colours
371 371
  */
372 372
 function test_lsx_customizer_colour_selectors_footer_widgets( $css, $colors ) {
373
-	$css .= <<<CSS
373
+     $css .= <<<CSS
374 374
 
375 375
 	/* Footer Widgets TEST */
376 376
 
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	}
383 383
 CSS;
384 384
 
385
-	return $css;
385
+     return $css;
386 386
 }
387 387
 add_filter( 'lsx_customizer_colour_selectors_footer_widgets', 'test_lsx_customizer_colour_selectors_footer_widgets', 10, 2 );
388 388
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
  * Add new selectors in "footer" group of colours
393 393
  */
394 394
 function test_lsx_customizer_colour_selectors_footer( $css, $colors ) {
395
-	$css .= <<<CSS
395
+     $css .= <<<CSS
396 396
 
397 397
 	/* Footer TEST */
398 398
 
@@ -404,6 +404,6 @@  discard block
 block discarded – undo
404 404
 	}
405 405
 CSS;
406 406
 
407
-	return $css;
407
+     return $css;
408 408
 }
409 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 2 patches
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.
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -6,97 +6,97 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 if ( ! function_exists( 'lsx_customizer_checkout_form_wrapper_div' ) ) {
9
-	/**
10
-	 * Used to wrap the checkout form in a div and include navigation links
11
-	 *
12
-	 * @return void
13
-	 */
14
-	function lsx_customizer_checkout_form_wrapper_div() {
15
-		echo '<div class="lsx-checkout-slides">'; ?>
9
+     /**
10
+      * Used to wrap the checkout form in a div and include navigation links
11
+      *
12
+      * @return void
13
+      */
14
+     function lsx_customizer_checkout_form_wrapper_div() {
15
+          echo '<div class="lsx-checkout-slides">'; ?>
16 16
 			<ul class="lsx-checkout-control-nav">
17 17
 				<li><a href="#"><?php esc_html_e( 'Your Details', 'lsx-customizer' ); ?></a></li>
18 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 24
 if ( ! function_exists( 'lsx_customizer_close_div' ) ) {
25
-	/**
26
-	 * Close a div
27
-	 *
28
-	 * @return void
29
-	 */
30
-	function lsx_customizer_close_div() {
31
-		echo '</div>';
32
-	}
25
+     /**
26
+      * Close a div
27
+      *
28
+      * @return void
29
+      */
30
+     function lsx_customizer_close_div() {
31
+          echo '</div>';
32
+     }
33 33
 }
34 34
 
35 35
 if ( ! function_exists( 'lsx_customizer_checkout_form_wrapper' ) ) {
36
-	/**
37
-	 * Used to wrap the checkout form in a ul
38
-	 *
39
-	 * @return void
40
-	 */
41
-	function lsx_customizer_checkout_form_wrapper() {
42
-		echo '<ul class="lsx-two-step-checkout">';
43
-	}
36
+     /**
37
+      * Used to wrap the checkout form in a ul
38
+      *
39
+      * @return void
40
+      */
41
+     function lsx_customizer_checkout_form_wrapper() {
42
+          echo '<ul class="lsx-two-step-checkout">';
43
+     }
44 44
 }
45 45
 
46 46
 if ( ! function_exists( 'lsx_customizer_close_ul' ) ) {
47
-	/**
48
-	 * Close the ul that wraps the checkout form
49
-	 *
50
-	 * @return void
51
-	 */
52
-	function lsx_customizer_close_ul() {
53
-		echo '</ul>';
54
-	}
47
+     /**
48
+      * Close the ul that wraps the checkout form
49
+      *
50
+      * @return void
51
+      */
52
+     function lsx_customizer_close_ul() {
53
+          echo '</ul>';
54
+     }
55 55
 }
56 56
 
57 57
 
58 58
 if ( ! function_exists( 'lsx_customizer_address_wrapper' ) ) {
59
-	/**
60
-	 * Used to wrap the address fields on the ckecout in an li
61
-	 *
62
-	 * @return void
63
-	 */
64
-	function lsx_customizer_address_wrapper() {
65
-		echo '<li class="lsx-customizer-addresses">';
66
-	}
59
+     /**
60
+      * Used to wrap the address fields on the ckecout in an li
61
+      *
62
+      * @return void
63
+      */
64
+     function lsx_customizer_address_wrapper() {
65
+          echo '<li class="lsx-customizer-addresses">';
66
+     }
67 67
 }
68 68
 
69 69
 if ( ! function_exists( 'lsx_customizer_close_li' ) ) {
70
-	/**
71
-	 * Close an li
72
-	 *
73
-	 * @return void
74
-	 */
75
-	function lsx_customizer_close_li() {
76
-		echo '</li>';
77
-	}
70
+     /**
71
+      * Close an li
72
+      *
73
+      * @return void
74
+      */
75
+     function lsx_customizer_close_li() {
76
+          echo '</li>';
77
+     }
78 78
 }
79 79
 
80 80
 if ( ! function_exists( 'lsx_customizer_order_review_wrap' ) ) {
81
-	/**
82
-	 * Used to wrap the order review in an li
83
-	 *
84
-	 * @return void
85
-	 */
86
-	function lsx_customizer_order_review_wrap() {
87
-		echo '<li class="order-review">';
88
-		echo '<h3 id="order_review_heading">' . esc_html__( 'Your order', 'lsx-customizer' ) . '</h3>';
89
-	}
81
+     /**
82
+      * Used to wrap the order review in an li
83
+      *
84
+      * @return void
85
+      */
86
+     function lsx_customizer_order_review_wrap() {
87
+          echo '<li class="order-review">';
88
+          echo '<h3 id="order_review_heading">' . esc_html__( 'Your order', 'lsx-customizer' ) . '</h3>';
89
+     }
90 90
 }
91 91
 
92 92
 if ( ! function_exists( 'lsx_customizer_fire_flexslider' ) ) {
93
-	/**
94
-	 * Fire FlexSlider
95
-	 *
96
-	 * @return void
97
-	 */
98
-	function lsx_customizer_fire_flexslider() {
99
-		?>
93
+     /**
94
+      * Fire FlexSlider
95
+      *
96
+      * @return void
97
+      */
98
+     function lsx_customizer_fire_flexslider() {
99
+          ?>
100 100
 		<script>
101 101
 		jQuery( window ).load(function() {
102 102
 			jQuery( '.lsx-checkout-slides' ).flexslider({
@@ -127,5 +127,5 @@  discard block
 block discarded – undo
127 127
 		});
128 128
 		</script>
129 129
 		<?php
130
-	}
130
+     }
131 131
 }
Please login to merge, or discard this patch.
classes/class-lsx-customizer-colour-body.php 2 patches
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! class_exists( 'LSX_Customizer_Colour_Body' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Body')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Body Class
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 		 * @since 1.0.0
19 19
 		 */
20 20
 		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
21
+			add_action('after_switch_theme', array($this, 'set_theme_mod'));
22
+			add_action('customize_save_after', array($this, 'set_theme_mod'));
23 23
 
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
24
+			add_action('wp_enqueue_scripts', array($this, 'enqueue_css'), 2999);
25 25
 		}
26 26
 
27 27
 		/**
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 		 */
32 32
 		public function set_theme_mod() {
33 33
 			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
34
+			$styles     = $this->get_css($theme_mods);
35 35
 
36
-			set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__body_theme_mod', $styles);
37 37
 		}
38 38
 
39 39
 		/**
@@ -42,20 +42,20 @@  discard block
 block discarded – undo
42 42
 		 * @since 1.0.0
43 43
 		 */
44 44
 		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__body_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__body_theme_mod');
46 46
 
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
47
+			if (is_customize_preview() || false === $styles_from_theme_mod) {
48 48
 				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
49
+				$styles     = $this->get_css($theme_mods);
50 50
 
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__body_theme_mod', $styles);
53 53
 				}
54 54
 			} else {
55 55
 				$styles = $styles_from_theme_mod;
56 56
 			}
57 57
 
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
58
+			wp_add_inline_style('lsx-customizer', $styles);
59 59
 		}
60 60
 
61 61
 		/**
@@ -66,29 +66,29 @@  discard block
 block discarded – undo
66 66
 		public function get_theme_mods() {
67 67
 			$colors = parent::get_color_scheme();
68 68
 
69
-			$background_color = get_theme_mod( 'background_color', $colors['background_color'] );
69
+			$background_color = get_theme_mod('background_color', $colors['background_color']);
70 70
 
71
-			if ( '#' !== substr( $background_color, 0, 1 ) ) {
71
+			if ('#' !== substr($background_color, 0, 1)) {
72 72
 				$background_color = '#' . $background_color;
73 73
 			}
74 74
 
75
-			return apply_filters( 'lsx_customizer_colours_body', array(
75
+			return apply_filters('lsx_customizer_colours_body', array(
76 76
 				'background_color'                       => $background_color,
77
-				'body_line_color'                        => get_theme_mod( 'body_line_color',                        $colors['body_line_color'] ),
78
-				'body_text_heading_color'                => get_theme_mod( 'body_text_heading_color',                $colors['body_text_heading_color'] ),
79
-				'body_text_small_color'                  => get_theme_mod( 'body_text_small_color',                  $colors['body_text_small_color'] ),
80
-				'body_text_color'                        => get_theme_mod( 'body_text_color',                        $colors['body_text_color'] ),
81
-				'body_link_color'                        => get_theme_mod( 'body_link_color',                        $colors['body_link_color'] ),
82
-				'body_link_hover_color'                  => get_theme_mod( 'body_link_hover_color',                  $colors['body_link_hover_color'] ),
83
-				'body_section_full_background_color'     => get_theme_mod( 'body_section_full_background_color',     $colors['body_section_full_background_color'] ),
84
-				'body_section_full_text_color'           => get_theme_mod( 'body_section_full_text_color',           $colors['body_section_full_text_color'] ),
85
-				'body_section_full_link_color'           => get_theme_mod( 'body_section_full_link_color',           $colors['body_section_full_link_color'] ),
86
-				'body_section_full_link_hover_color'     => get_theme_mod( 'body_section_full_link_hover_color',     $colors['body_section_full_link_hover_color'] ),
87
-				'body_section_full_cta_background_color' => get_theme_mod( 'body_section_full_cta_background_color', $colors['body_section_full_cta_background_color'] ),
88
-				'body_section_full_cta_text_color'       => get_theme_mod( 'body_section_full_cta_text_color',       $colors['body_section_full_cta_text_color'] ),
89
-				'body_section_full_cta_link_color'       => get_theme_mod( 'body_section_full_cta_link_color',       $colors['body_section_full_cta_link_color'] ),
90
-				'body_section_full_cta_link_hover_color' => get_theme_mod( 'body_section_full_cta_link_hover_color', $colors['body_section_full_cta_link_hover_color'] ),
91
-			) );
77
+				'body_line_color'                        => get_theme_mod('body_line_color', $colors['body_line_color']),
78
+				'body_text_heading_color'                => get_theme_mod('body_text_heading_color', $colors['body_text_heading_color']),
79
+				'body_text_small_color'                  => get_theme_mod('body_text_small_color', $colors['body_text_small_color']),
80
+				'body_text_color'                        => get_theme_mod('body_text_color', $colors['body_text_color']),
81
+				'body_link_color'                        => get_theme_mod('body_link_color', $colors['body_link_color']),
82
+				'body_link_hover_color'                  => get_theme_mod('body_link_hover_color', $colors['body_link_hover_color']),
83
+				'body_section_full_background_color'     => get_theme_mod('body_section_full_background_color', $colors['body_section_full_background_color']),
84
+				'body_section_full_text_color'           => get_theme_mod('body_section_full_text_color', $colors['body_section_full_text_color']),
85
+				'body_section_full_link_color'           => get_theme_mod('body_section_full_link_color', $colors['body_section_full_link_color']),
86
+				'body_section_full_link_hover_color'     => get_theme_mod('body_section_full_link_hover_color', $colors['body_section_full_link_hover_color']),
87
+				'body_section_full_cta_background_color' => get_theme_mod('body_section_full_cta_background_color', $colors['body_section_full_cta_background_color']),
88
+				'body_section_full_cta_text_color'       => get_theme_mod('body_section_full_cta_text_color', $colors['body_section_full_cta_text_color']),
89
+				'body_section_full_cta_link_color'       => get_theme_mod('body_section_full_cta_link_color', $colors['body_section_full_cta_link_color']),
90
+				'body_section_full_cta_link_hover_color' => get_theme_mod('body_section_full_cta_link_hover_color', $colors['body_section_full_cta_link_hover_color']),
91
+			));
92 92
 		}
93 93
 
94 94
 		/**
@@ -96,32 +96,32 @@  discard block
 block discarded – undo
96 96
 		 *
97 97
 		 * @since 1.0.0
98 98
 		 */
99
-		function get_css( $colors ) {
99
+		function get_css($colors) {
100 100
 			global $customizer_colour_names;
101 101
 
102 102
 			$colors_template = array();
103 103
 
104
-			foreach ( $customizer_colour_names as $key => $value ) {
105
-				$colors_template[ $key ] = '';
104
+			foreach ($customizer_colour_names as $key => $value) {
105
+				$colors_template[$key] = '';
106 106
 			}
107 107
 
108
-			$colors = wp_parse_args( $colors, $colors_template );
109
-
110
-			if ( empty( $colors['background_color'] )
111
-				|| empty( $colors['body_line_color'] )
112
-				|| empty( $colors['body_text_heading_color'] )
113
-				|| empty( $colors['body_text_color'] )
114
-				|| empty( $colors['body_link_color'] )
115
-				|| empty( $colors['body_link_hover_color'] )
116
-				|| empty( $colors['body_text_small_color'] )
117
-				|| empty( $colors['body_section_full_background_color'] )
118
-				|| empty( $colors['body_section_full_text_color'] )
119
-				|| empty( $colors['body_section_full_link_color'] )
120
-				|| empty( $colors['body_section_full_link_hover_color'] )
121
-				|| empty( $colors['body_section_full_cta_background_color'] )
122
-				|| empty( $colors['body_section_full_cta_text_color'] )
123
-				|| empty( $colors['body_section_full_cta_link_color'] )
124
-				|| empty( $colors['body_section_full_cta_link_hover_color'] ) ) {
108
+			$colors = wp_parse_args($colors, $colors_template);
109
+
110
+			if (empty($colors['background_color'])
111
+				|| empty($colors['body_line_color'])
112
+				|| empty($colors['body_text_heading_color'])
113
+				|| empty($colors['body_text_color'])
114
+				|| empty($colors['body_link_color'])
115
+				|| empty($colors['body_link_hover_color'])
116
+				|| empty($colors['body_text_small_color'])
117
+				|| empty($colors['body_section_full_background_color'])
118
+				|| empty($colors['body_section_full_text_color'])
119
+				|| empty($colors['body_section_full_link_color'])
120
+				|| empty($colors['body_section_full_link_hover_color'])
121
+				|| empty($colors['body_section_full_cta_background_color'])
122
+				|| empty($colors['body_section_full_cta_text_color'])
123
+				|| empty($colors['body_section_full_cta_link_color'])
124
+				|| empty($colors['body_section_full_cta_link_hover_color'])) {
125 125
 				return '';
126 126
 			}
127 127
 
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 				);
151 151
 			';
152 152
 
153
-			$css = apply_filters( 'lsx_customizer_colour_selectors_body', $css, $colors );
154
-			$css = parent::scss_to_css( $css );
153
+			$css = apply_filters('lsx_customizer_colour_selectors_body', $css, $colors);
154
+			$css = parent::scss_to_css($css);
155 155
 
156 156
 			return $css;
157 157
 		}
Please login to merge, or discard this patch.
Indentation   +130 added lines, -130 removed lines patch added patch discarded remove patch
@@ -1,131 +1,131 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! class_exists( 'LSX_Customizer_Colour_Body' ) ) {
3 3
 
4
-	/**
5
-	 * LSX Customizer Colour Body Class
6
-	 *
7
-	 * @package   LSX Customizer
8
-	 * @author    LightSpeed
9
-	 * @license   GPL3
10
-	 * @link
11
-	 * @copyright 2016 LightSpeed
12
-	 */
13
-	class LSX_Customizer_Colour_Body extends LSX_Customizer_Colour {
14
-
15
-		/**
16
-		 * Constructor.
17
-		 *
18
-		 * @since 1.0.0
19
-		 */
20
-		public function __construct() {
21
-			add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
-			add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
23
-
24
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
25
-		}
26
-
27
-		/**
28
-		 * Assign CSS to theme mod.
29
-		 *
30
-		 * @since 1.0.0
31
-		 */
32
-		public function set_theme_mod() {
33
-			$theme_mods = $this->get_theme_mods();
34
-			$styles     = $this->get_css( $theme_mods );
35
-
36
-			set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles );
37
-		}
38
-
39
-		/**
40
-		 * Enqueues front-end CSS.
41
-		 *
42
-		 * @since 1.0.0
43
-		 */
44
-		public function enqueue_css() {
45
-			$styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__body_theme_mod' );
46
-
47
-			if ( is_customize_preview() || false === $styles_from_theme_mod ) {
48
-				$theme_mods = $this->get_theme_mods();
49
-				$styles     = $this->get_css( $theme_mods );
50
-
51
-				if ( false === $styles_from_theme_mod ) {
52
-					set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles );
53
-				}
54
-			} else {
55
-				$styles = $styles_from_theme_mod;
56
-			}
57
-
58
-			wp_add_inline_style( 'lsx-customizer', $styles );
59
-		}
60
-
61
-		/**
62
-		 * Get CSS theme mods.
63
-		 *
64
-		 * @since 1.0.0
65
-		 */
66
-		public function get_theme_mods() {
67
-			$colors = parent::get_color_scheme();
68
-
69
-			$background_color = get_theme_mod( 'background_color', $colors['background_color'] );
70
-
71
-			if ( '#' !== substr( $background_color, 0, 1 ) ) {
72
-				$background_color = '#' . $background_color;
73
-			}
74
-
75
-			return apply_filters( 'lsx_customizer_colours_body', array(
76
-				'background_color'                       => $background_color,
77
-				'body_line_color'                        => get_theme_mod( 'body_line_color',                        $colors['body_line_color'] ),
78
-				'body_text_heading_color'                => get_theme_mod( 'body_text_heading_color',                $colors['body_text_heading_color'] ),
79
-				'body_text_small_color'                  => get_theme_mod( 'body_text_small_color',                  $colors['body_text_small_color'] ),
80
-				'body_text_color'                        => get_theme_mod( 'body_text_color',                        $colors['body_text_color'] ),
81
-				'body_link_color'                        => get_theme_mod( 'body_link_color',                        $colors['body_link_color'] ),
82
-				'body_link_hover_color'                  => get_theme_mod( 'body_link_hover_color',                  $colors['body_link_hover_color'] ),
83
-				'body_section_full_background_color'     => get_theme_mod( 'body_section_full_background_color',     $colors['body_section_full_background_color'] ),
84
-				'body_section_full_text_color'           => get_theme_mod( 'body_section_full_text_color',           $colors['body_section_full_text_color'] ),
85
-				'body_section_full_link_color'           => get_theme_mod( 'body_section_full_link_color',           $colors['body_section_full_link_color'] ),
86
-				'body_section_full_link_hover_color'     => get_theme_mod( 'body_section_full_link_hover_color',     $colors['body_section_full_link_hover_color'] ),
87
-				'body_section_full_cta_background_color' => get_theme_mod( 'body_section_full_cta_background_color', $colors['body_section_full_cta_background_color'] ),
88
-				'body_section_full_cta_text_color'       => get_theme_mod( 'body_section_full_cta_text_color',       $colors['body_section_full_cta_text_color'] ),
89
-				'body_section_full_cta_link_color'       => get_theme_mod( 'body_section_full_cta_link_color',       $colors['body_section_full_cta_link_color'] ),
90
-				'body_section_full_cta_link_hover_color' => get_theme_mod( 'body_section_full_cta_link_hover_color', $colors['body_section_full_cta_link_hover_color'] ),
91
-			) );
92
-		}
93
-
94
-		/**
95
-		 * Returns CSS.
96
-		 *
97
-		 * @since 1.0.0
98
-		 */
99
-		function get_css( $colors ) {
100
-			global $customizer_colour_names;
101
-
102
-			$colors_template = array();
103
-
104
-			foreach ( $customizer_colour_names as $key => $value ) {
105
-				$colors_template[ $key ] = '';
106
-			}
107
-
108
-			$colors = wp_parse_args( $colors, $colors_template );
109
-
110
-			if ( empty( $colors['background_color'] )
111
-				|| empty( $colors['body_line_color'] )
112
-				|| empty( $colors['body_text_heading_color'] )
113
-				|| empty( $colors['body_text_color'] )
114
-				|| empty( $colors['body_link_color'] )
115
-				|| empty( $colors['body_link_hover_color'] )
116
-				|| empty( $colors['body_text_small_color'] )
117
-				|| empty( $colors['body_section_full_background_color'] )
118
-				|| empty( $colors['body_section_full_text_color'] )
119
-				|| empty( $colors['body_section_full_link_color'] )
120
-				|| empty( $colors['body_section_full_link_hover_color'] )
121
-				|| empty( $colors['body_section_full_cta_background_color'] )
122
-				|| empty( $colors['body_section_full_cta_text_color'] )
123
-				|| empty( $colors['body_section_full_cta_link_color'] )
124
-				|| empty( $colors['body_section_full_cta_link_hover_color'] ) ) {
125
-				return '';
126
-			}
127
-
128
-			$css = '
4
+     /**
5
+      * LSX Customizer Colour Body Class
6
+      *
7
+      * @package   LSX Customizer
8
+      * @author    LightSpeed
9
+      * @license   GPL3
10
+      * @link
11
+      * @copyright 2016 LightSpeed
12
+      */
13
+     class LSX_Customizer_Colour_Body extends LSX_Customizer_Colour {
14
+
15
+          /**
16
+           * Constructor.
17
+           *
18
+           * @since 1.0.0
19
+           */
20
+          public function __construct() {
21
+               add_action( 'after_switch_theme',   array( $this, 'set_theme_mod' ) );
22
+               add_action( 'customize_save_after', array( $this, 'set_theme_mod' ) );
23
+
24
+               add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ), 2999 );
25
+          }
26
+
27
+          /**
28
+           * Assign CSS to theme mod.
29
+           *
30
+           * @since 1.0.0
31
+           */
32
+          public function set_theme_mod() {
33
+               $theme_mods = $this->get_theme_mods();
34
+               $styles     = $this->get_css( $theme_mods );
35
+
36
+               set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles );
37
+          }
38
+
39
+          /**
40
+           * Enqueues front-end CSS.
41
+           *
42
+           * @since 1.0.0
43
+           */
44
+          public function enqueue_css() {
45
+               $styles_from_theme_mod = get_theme_mod( 'lsx_customizer_colour__body_theme_mod' );
46
+
47
+               if ( is_customize_preview() || false === $styles_from_theme_mod ) {
48
+                    $theme_mods = $this->get_theme_mods();
49
+                    $styles     = $this->get_css( $theme_mods );
50
+
51
+                    if ( false === $styles_from_theme_mod ) {
52
+                         set_theme_mod( 'lsx_customizer_colour__body_theme_mod', $styles );
53
+                    }
54
+               } else {
55
+                    $styles = $styles_from_theme_mod;
56
+               }
57
+
58
+               wp_add_inline_style( 'lsx-customizer', $styles );
59
+          }
60
+
61
+          /**
62
+           * Get CSS theme mods.
63
+           *
64
+           * @since 1.0.0
65
+           */
66
+          public function get_theme_mods() {
67
+               $colors = parent::get_color_scheme();
68
+
69
+               $background_color = get_theme_mod( 'background_color', $colors['background_color'] );
70
+
71
+               if ( '#' !== substr( $background_color, 0, 1 ) ) {
72
+                    $background_color = '#' . $background_color;
73
+               }
74
+
75
+               return apply_filters( 'lsx_customizer_colours_body', array(
76
+                    'background_color'                       => $background_color,
77
+                    'body_line_color'                        => get_theme_mod( 'body_line_color',                        $colors['body_line_color'] ),
78
+                    'body_text_heading_color'                => get_theme_mod( 'body_text_heading_color',                $colors['body_text_heading_color'] ),
79
+                    'body_text_small_color'                  => get_theme_mod( 'body_text_small_color',                  $colors['body_text_small_color'] ),
80
+                    'body_text_color'                        => get_theme_mod( 'body_text_color',                        $colors['body_text_color'] ),
81
+                    'body_link_color'                        => get_theme_mod( 'body_link_color',                        $colors['body_link_color'] ),
82
+                    'body_link_hover_color'                  => get_theme_mod( 'body_link_hover_color',                  $colors['body_link_hover_color'] ),
83
+                    'body_section_full_background_color'     => get_theme_mod( 'body_section_full_background_color',     $colors['body_section_full_background_color'] ),
84
+                    'body_section_full_text_color'           => get_theme_mod( 'body_section_full_text_color',           $colors['body_section_full_text_color'] ),
85
+                    'body_section_full_link_color'           => get_theme_mod( 'body_section_full_link_color',           $colors['body_section_full_link_color'] ),
86
+                    'body_section_full_link_hover_color'     => get_theme_mod( 'body_section_full_link_hover_color',     $colors['body_section_full_link_hover_color'] ),
87
+                    'body_section_full_cta_background_color' => get_theme_mod( 'body_section_full_cta_background_color', $colors['body_section_full_cta_background_color'] ),
88
+                    'body_section_full_cta_text_color'       => get_theme_mod( 'body_section_full_cta_text_color',       $colors['body_section_full_cta_text_color'] ),
89
+                    'body_section_full_cta_link_color'       => get_theme_mod( 'body_section_full_cta_link_color',       $colors['body_section_full_cta_link_color'] ),
90
+                    'body_section_full_cta_link_hover_color' => get_theme_mod( 'body_section_full_cta_link_hover_color', $colors['body_section_full_cta_link_hover_color'] ),
91
+               ) );
92
+          }
93
+
94
+          /**
95
+           * Returns CSS.
96
+           *
97
+           * @since 1.0.0
98
+           */
99
+          function get_css( $colors ) {
100
+               global $customizer_colour_names;
101
+
102
+               $colors_template = array();
103
+
104
+               foreach ( $customizer_colour_names as $key => $value ) {
105
+                    $colors_template[ $key ] = '';
106
+               }
107
+
108
+               $colors = wp_parse_args( $colors, $colors_template );
109
+
110
+               if ( empty( $colors['background_color'] )
111
+                    || empty( $colors['body_line_color'] )
112
+                    || empty( $colors['body_text_heading_color'] )
113
+                    || empty( $colors['body_text_color'] )
114
+                    || empty( $colors['body_link_color'] )
115
+                    || empty( $colors['body_link_hover_color'] )
116
+                    || empty( $colors['body_text_small_color'] )
117
+                    || empty( $colors['body_section_full_background_color'] )
118
+                    || empty( $colors['body_section_full_text_color'] )
119
+                    || empty( $colors['body_section_full_link_color'] )
120
+                    || empty( $colors['body_section_full_link_hover_color'] )
121
+                    || empty( $colors['body_section_full_cta_background_color'] )
122
+                    || empty( $colors['body_section_full_cta_text_color'] )
123
+                    || empty( $colors['body_section_full_cta_link_color'] )
124
+                    || empty( $colors['body_section_full_cta_link_hover_color'] ) ) {
125
+                    return '';
126
+               }
127
+
128
+               $css = '
129 129
 				@import "' . get_template_directory() . '/assets/css/scss/global/mixins/content";
130 130
 
131 131
 				/**
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
 				);
151 151
 			';
152 152
 
153
-			$css = apply_filters( 'lsx_customizer_colour_selectors_body', $css, $colors );
154
-			$css = parent::scss_to_css( $css );
153
+               $css = apply_filters( 'lsx_customizer_colour_selectors_body', $css, $colors );
154
+               $css = parent::scss_to_css( $css );
155 155
 
156
-			return $css;
157
-		}
156
+               return $css;
157
+          }
158 158
 
159
-	}
159
+     }
160 160
 
161 161
 }
Please login to merge, or discard this patch.
classes/class-lsx-customizer-wysiwyg-control.php 2 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -1,57 +1,57 @@
 block discarded – undo
1 1
 <?php
2 2
 if ( ! class_exists( 'LSX_Customizer_Wysiwyg_Control' ) ) {
3 3
 
4
-	/**
5
-	 * LSX Customizer Wysiwyg Control Class
6
-	 *
7
-	 * @package   LSX Customizer
8
-	 * @author    LightSpeed
9
-	 * @license   GPL3
10
-	 * @link
11
-	 * @copyright 2016 LightSpeed
12
-	 */
13
-	class LSX_Customizer_Wysiwyg_Control extends WP_Customize_Control {
14
-
15
-		public $type = 'wysiwyg';
16
-
17
-		/**
18
-		 * Render the control's content.
19
-		 *
20
-		 * @since 1.1.1
21
-		 */
22
-		public function render_content() {
23
-			?>
4
+     /**
5
+      * LSX Customizer Wysiwyg Control Class
6
+      *
7
+      * @package   LSX Customizer
8
+      * @author    LightSpeed
9
+      * @license   GPL3
10
+      * @link
11
+      * @copyright 2016 LightSpeed
12
+      */
13
+     class LSX_Customizer_Wysiwyg_Control extends WP_Customize_Control {
14
+
15
+          public $type = 'wysiwyg';
16
+
17
+          /**
18
+           * Render the control's content.
19
+           *
20
+           * @since 1.1.1
21
+           */
22
+          public function render_content() {
23
+               ?>
24 24
 			<label>
25 25
 				<?php if ( ! empty( $this->label ) ) { ?>
26 26
 					<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
27 27
 				<?php } ?>
28 28
 				<?php
29
-					$settings = array(
30
-						'media_buttons' => false,
31
-						'teeny' => true,
32
-					);
33
-
34
-					$this->filter_editor_setting_link();
35
-					wp_editor( $this->value(), $this->id, $settings );
36
-				?>
29
+                         $settings = array(
30
+                              'media_buttons' => false,
31
+                              'teeny' => true,
32
+                         );
33
+
34
+                         $this->filter_editor_setting_link();
35
+                         wp_editor( $this->value(), $this->id, $settings );
36
+                    ?>
37 37
 			</label>
38 38
 			<?php
39
-			do_action( 'admin_footer' );
40
-			do_action( 'admin_print_footer_scripts' );
41
-		}
42
-
43
-		/**
44
-		 * Filter editor setting link.
45
-		 *
46
-		 * @since 1.1.1
47
-		 */
48
-		private function filter_editor_setting_link() {
49
-			add_filter( 'the_editor', function( $output ) {
50
-				return preg_replace( '/<textarea/', '<textarea ' . $this->get_link(), $output, 1 );
51
-			} );
52
-		}
53
-
54
-	}
39
+               do_action( 'admin_footer' );
40
+               do_action( 'admin_print_footer_scripts' );
41
+          }
42
+
43
+          /**
44
+           * Filter editor setting link.
45
+           *
46
+           * @since 1.1.1
47
+           */
48
+          private function filter_editor_setting_link() {
49
+               add_filter( 'the_editor', function( $output ) {
50
+                    return preg_replace( '/<textarea/', '<textarea ' . $this->get_link(), $output, 1 );
51
+               } );
52
+          }
53
+
54
+     }
55 55
 
56 56
 }
57 57
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 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_Wysiwyg_Control' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Wysiwyg_Control')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Wysiwyg Control Class
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 		public function render_content() {
23 23
 			?>
24 24
 			<label>
25
-				<?php if ( ! empty( $this->label ) ) { ?>
26
-					<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
25
+				<?php if ( ! empty($this->label)) { ?>
26
+					<span class="customize-control-title"><?php echo esc_html($this->label); ?></span>
27 27
 				<?php } ?>
28 28
 				<?php
29 29
 					$settings = array(
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
 					);
33 33
 
34 34
 					$this->filter_editor_setting_link();
35
-					wp_editor( $this->value(), $this->id, $settings );
35
+					wp_editor($this->value(), $this->id, $settings);
36 36
 				?>
37 37
 			</label>
38 38
 			<?php
39
-			do_action( 'admin_footer' );
40
-			do_action( 'admin_print_footer_scripts' );
39
+			do_action('admin_footer');
40
+			do_action('admin_print_footer_scripts');
41 41
 		}
42 42
 
43 43
 		/**
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 		 * @since 1.1.1
47 47
 		 */
48 48
 		private function filter_editor_setting_link() {
49
-			add_filter( 'the_editor', function( $output ) {
50
-				return preg_replace( '/<textarea/', '<textarea ' . $this->get_link(), $output, 1 );
49
+			add_filter('the_editor', function($output) {
50
+				return preg_replace('/<textarea/', '<textarea ' . $this->get_link(), $output, 1);
51 51
 			} );
52 52
 		}
53 53
 
Please login to merge, or discard this patch.
classes/class-lsx-customizer-frontend.php 2 patches
Indentation   +174 added lines, -174 removed lines patch added patch discarded remove patch
@@ -1,63 +1,63 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! class_exists( 'LSX_Customizer_Frontend' ) ) {
3 3
 
4
-	/**
5
-	 * LSX Customizer Frontend Class
6
-	 *
7
-	 * @package   LSX Customizer
8
-	 * @author    LightSpeed
9
-	 * @license   GPL3
10
-	 * @link
11
-	 * @copyright 2016 LightSpeed
12
-	 */
13
-	class LSX_Customizer_Frontend extends LSX_Customizer {
14
-
15
-		/**
16
-		 * Constructor.
17
-		 *
18
-		 * @since 1.0.0
19
-		 */
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 );
27
-		}
28
-
29
-		/**
30
-		 * Enques the assets.
31
-		 *
32
-		 * @since 1.0.0
33
-		 */
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 );
36
-
37
-			$params = apply_filters( 'lsx_customizer_js_params', array(
38
-				'ajax_url' => admin_url( 'admin-ajax.php' ),
39
-			));
40
-
41
-			wp_localize_script( 'lsx-customizer', 'lsx_customizer_params', $params );
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' );
45
-
46
-			$two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
47
-			if ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && is_checkout() && ! empty( $two_step_checkout ) ) {
48
-
49
-				wp_enqueue_script( 'flexslider', LSX_CUSTOMIZER_URL . 'assets/js/jquery.flexslider.min.js', array( 'jquery' ), '2.5.0' );
50
-			}
51
-
52
-		}
53
-
54
-		/**
55
-		 * Enqueues front-end colour palette CSS.
56
-		 *
57
-		 * @since 1.0.0
58
-		 */
59
-		public function lsx_customizer_color_palette_css() {
60
-			$styles = '
4
+     /**
5
+      * LSX Customizer Frontend Class
6
+      *
7
+      * @package   LSX Customizer
8
+      * @author    LightSpeed
9
+      * @license   GPL3
10
+      * @link
11
+      * @copyright 2016 LightSpeed
12
+      */
13
+     class LSX_Customizer_Frontend extends LSX_Customizer {
14
+
15
+          /**
16
+           * Constructor.
17
+           *
18
+           * @since 1.0.0
19
+           */
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 );
27
+          }
28
+
29
+          /**
30
+           * Enques the assets.
31
+           *
32
+           * @since 1.0.0
33
+           */
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 );
36
+
37
+               $params = apply_filters( 'lsx_customizer_js_params', array(
38
+                    'ajax_url' => admin_url( 'admin-ajax.php' ),
39
+               ));
40
+
41
+               wp_localize_script( 'lsx-customizer', 'lsx_customizer_params', $params );
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' );
45
+
46
+               $two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
47
+               if ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && is_checkout() && ! empty( $two_step_checkout ) ) {
48
+
49
+                    wp_enqueue_script( 'flexslider', LSX_CUSTOMIZER_URL . 'assets/js/jquery.flexslider.min.js', array( 'jquery' ), '2.5.0' );
50
+               }
51
+
52
+          }
53
+
54
+          /**
55
+           * Enqueues front-end colour palette CSS.
56
+           *
57
+           * @since 1.0.0
58
+           */
59
+          public function lsx_customizer_color_palette_css() {
60
+               $styles = '
61 61
 			.container #primary.content-area .has-primary-color-background-color {
62 62
 				background-color:' . get_theme_mod( 'primary_color', '#428bca' ) . ';
63 63
 			}
@@ -136,122 +136,122 @@  discard block
 block discarded – undo
136 136
 			}
137 137
 
138 138
 			';
139
-			wp_add_inline_style( 'lsx-customizer', $styles );
140
-		}
141
-
142
-		/**
143
-		 * Layout.
144
-		 *
145
-		 * @since 1.0.0
146
-		 */
147
-		public function layout() {
148
-			$theme_credit = get_theme_mod( 'lsx_theme_credit_status', true );
149
-
150
-			if ( false == $theme_credit ) {
151
-				add_filter( 'lsx_credit_link', '__return_false' );
152
-			}
153
-		}
154
-
155
-		/**
156
-		 * Create the distraction free checkout.
157
-		 *
158
-		 * @since 1.0.0
159
-		 * @return  void
160
-		 */
161
-		public function lsx_distraction_free_checkout() {
162
-
163
-			$distraction_free = get_theme_mod( 'lsx_distraction_free_checkout', false );
164
-
165
-			if ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && is_checkout() && ! empty( $distraction_free ) ) {
166
-				remove_action( 'lsx_body_bottom', 'lsx_wc_footer_bar', 15 );
167
-
168
-			}
169
-		}
170
-
171
-		/**
172
-		 * Create the two step checkout.
173
-		 *
174
-		 * @since   1.0.0
175
-		 * @return  void
176
-		 */
177
-		public function lsx_customizer_two_step_checkout() {
178
-			$two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
179
-
180
-			if ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && 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
-			}
191
-		}
192
-
193
-		/**
194
-		 * Editor color palette.
195
-		 *
196
-		 * @return void
197
-		 */
198
-		public function lsx_customizer_color_palette_setup() {
199
-			add_theme_support( 'editor-color-palette', array(
200
-				array(
201
-					'name'  => esc_html__( 'Primary Color', 'lsx-customizer' ),
202
-					'slug'  => 'primary-color',
203
-					'color' => get_theme_mod( 'primary_color', '#428bca' ),
204
-				),
205
-				array(
206
-					'name'  => esc_html__( 'Strong Primary Color', 'lsx-customizer' ),
207
-					'slug'  => 'strong-primary-color',
208
-					'color' => get_theme_mod( 'strong_primary_color', '#2a6496' ),
209
-				),
210
-				array(
211
-					'name'  => esc_html__( 'CTA Color', 'lsx-customizer' ),
212
-					'slug'  => 'cta-color',
213
-					'color' => get_theme_mod( 'call_to_action_color', '#f7941d' ),
214
-				),
215
-				array(
216
-					'name'  => esc_html__( 'Strong CTA Color', 'lsx-customizer' ),
217
-					'slug'  => 'strong-cta-color',
218
-					'color' => get_theme_mod( 'strong_cta_color', '#f7741d' ),
219
-				),
220
-				array(
221
-					'name'  => esc_html__( 'Secondary Color', 'lsx-customizer' ),
222
-					'slug'  => 'secondary-color',
223
-					'color' => get_theme_mod( 'secondary_color', '#eaeaea' ),
224
-				),
225
-				array(
226
-					'name'  => esc_html__( 'Strong Secondary Color', 'lsx-customizer' ),
227
-					'slug'  => 'strong-secondary-color',
228
-					'color' => get_theme_mod( 'strong_secondary_color', '#c4c4c4' ),
229
-				),
230
-				array(
231
-					'name'  => esc_html__( 'Tertiary Color', 'lsx-customizer' ),
232
-					'slug'  => 'tertiary-color',
233
-					'color' => get_theme_mod( 'tertiary_color', '#6BA913' ),
234
-				),
235
-				array(
236
-					'name'  => esc_html__( 'Strong Tertiary Color', 'lsx-customizer' ),
237
-					'slug'  => 'strong-tertiary-color',
238
-					'color' => get_theme_mod( 'strong_tertiary_color', '#3F640B' ),
239
-				),
240
-				array(
241
-					'name'  => esc_html__( 'White', 'lsx-customizer' ),
242
-					'slug'  => 'white',
243
-					'color' => '#ffffff',
244
-				),
245
-				array(
246
-					'name'  => esc_html__( 'Black', 'lsx-customizer' ),
247
-					'slug'  => 'black',
248
-					'color' => '#000000',
249
-				),
250
-			));
251
-		}
252
-
253
-	}
254
-
255
-	new LSX_Customizer_Frontend();
139
+               wp_add_inline_style( 'lsx-customizer', $styles );
140
+          }
141
+
142
+          /**
143
+           * Layout.
144
+           *
145
+           * @since 1.0.0
146
+           */
147
+          public function layout() {
148
+               $theme_credit = get_theme_mod( 'lsx_theme_credit_status', true );
149
+
150
+               if ( false == $theme_credit ) {
151
+                    add_filter( 'lsx_credit_link', '__return_false' );
152
+               }
153
+          }
154
+
155
+          /**
156
+           * Create the distraction free checkout.
157
+           *
158
+           * @since 1.0.0
159
+           * @return  void
160
+           */
161
+          public function lsx_distraction_free_checkout() {
162
+
163
+               $distraction_free = get_theme_mod( 'lsx_distraction_free_checkout', false );
164
+
165
+               if ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && is_checkout() && ! empty( $distraction_free ) ) {
166
+                    remove_action( 'lsx_body_bottom', 'lsx_wc_footer_bar', 15 );
167
+
168
+               }
169
+          }
170
+
171
+          /**
172
+           * Create the two step checkout.
173
+           *
174
+           * @since   1.0.0
175
+           * @return  void
176
+           */
177
+          public function lsx_customizer_two_step_checkout() {
178
+               $two_step_checkout = get_theme_mod( 'lsx_two_step_checkout', false );
179
+
180
+               if ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && 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
+               }
191
+          }
192
+
193
+          /**
194
+           * Editor color palette.
195
+           *
196
+           * @return void
197
+           */
198
+          public function lsx_customizer_color_palette_setup() {
199
+               add_theme_support( 'editor-color-palette', array(
200
+                    array(
201
+                         'name'  => esc_html__( 'Primary Color', 'lsx-customizer' ),
202
+                         'slug'  => 'primary-color',
203
+                         'color' => get_theme_mod( 'primary_color', '#428bca' ),
204
+                    ),
205
+                    array(
206
+                         'name'  => esc_html__( 'Strong Primary Color', 'lsx-customizer' ),
207
+                         'slug'  => 'strong-primary-color',
208
+                         'color' => get_theme_mod( 'strong_primary_color', '#2a6496' ),
209
+                    ),
210
+                    array(
211
+                         'name'  => esc_html__( 'CTA Color', 'lsx-customizer' ),
212
+                         'slug'  => 'cta-color',
213
+                         'color' => get_theme_mod( 'call_to_action_color', '#f7941d' ),
214
+                    ),
215
+                    array(
216
+                         'name'  => esc_html__( 'Strong CTA Color', 'lsx-customizer' ),
217
+                         'slug'  => 'strong-cta-color',
218
+                         'color' => get_theme_mod( 'strong_cta_color', '#f7741d' ),
219
+                    ),
220
+                    array(
221
+                         'name'  => esc_html__( 'Secondary Color', 'lsx-customizer' ),
222
+                         'slug'  => 'secondary-color',
223
+                         'color' => get_theme_mod( 'secondary_color', '#eaeaea' ),
224
+                    ),
225
+                    array(
226
+                         'name'  => esc_html__( 'Strong Secondary Color', 'lsx-customizer' ),
227
+                         'slug'  => 'strong-secondary-color',
228
+                         'color' => get_theme_mod( 'strong_secondary_color', '#c4c4c4' ),
229
+                    ),
230
+                    array(
231
+                         'name'  => esc_html__( 'Tertiary Color', 'lsx-customizer' ),
232
+                         'slug'  => 'tertiary-color',
233
+                         'color' => get_theme_mod( 'tertiary_color', '#6BA913' ),
234
+                    ),
235
+                    array(
236
+                         'name'  => esc_html__( 'Strong Tertiary Color', 'lsx-customizer' ),
237
+                         'slug'  => 'strong-tertiary-color',
238
+                         'color' => get_theme_mod( 'strong_tertiary_color', '#3F640B' ),
239
+                    ),
240
+                    array(
241
+                         'name'  => esc_html__( 'White', 'lsx-customizer' ),
242
+                         'slug'  => 'white',
243
+                         'color' => '#ffffff',
244
+                    ),
245
+                    array(
246
+                         'name'  => esc_html__( 'Black', 'lsx-customizer' ),
247
+                         'slug'  => 'black',
248
+                         'color' => '#000000',
249
+                    ),
250
+               ));
251
+          }
252
+
253
+     }
254
+
255
+     new LSX_Customizer_Frontend();
256 256
 
257 257
 }
Please login to merge, or discard this patch.
Spacing   +76 added lines, -76 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 ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && is_checkout() && ! empty( $two_step_checkout ) ) {
46
+			$two_step_checkout = get_theme_mod('lsx_two_step_checkout', false);
47
+			if (class_exists('WooCommerce') && function_exists('is_checkout') && 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 ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && is_checkout() && ! empty( $distraction_free ) ) {
166
-				remove_action( 'lsx_body_bottom', 'lsx_wc_footer_bar', 15 );
165
+			if (class_exists('WooCommerce') && function_exists('is_checkout') && 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 ( class_exists( 'WooCommerce' ) && function_exists( 'is_checkout' ) && 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 (class_exists('WooCommerce') && function_exists('is_checkout') && 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,54 +196,54 @@  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__( 'White', 'lsx-customizer' ),
241
+					'name'  => esc_html__('White', 'lsx-customizer'),
242 242
 					'slug'  => 'white',
243 243
 					'color' => '#ffffff',
244 244
 				),
245 245
 				array(
246
-					'name'  => esc_html__( 'Black', 'lsx-customizer' ),
246
+					'name'  => esc_html__('Black', 'lsx-customizer'),
247 247
 					'slug'  => 'black',
248 248
 					'color' => '#000000',
249 249
 				),
Please login to merge, or discard this patch.