Passed
Pull Request — master (#114)
by
unknown
04:41 queued 36s
created
classes/class-lsx-customizer-colour-footer-widgets.php 1 patch
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_Widgets' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Footer_Widgets')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Footer Widgets 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_widgets_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__footer_widgets_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_widgets_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__footer_widgets_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_widgets_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__footer_widgets_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_widgets', array(
70
-				'footer_widgets_background_color' => get_theme_mod( 'footer_widgets_background_color', $colors['footer_widgets_background_color'] ),
71
-				'footer_widgets_text_color'       => get_theme_mod( 'footer_widgets_text_color',       $colors['footer_widgets_text_color'] ),
72
-				'footer_widgets_link_color'       => get_theme_mod( 'footer_widgets_link_color',       $colors['footer_widgets_link_color'] ),
73
-				'footer_widgets_link_hover_color' => get_theme_mod( 'footer_widgets_link_hover_color', $colors['footer_widgets_link_hover_color'] ),
74
-			) );
69
+			return apply_filters('lsx_customizer_colours_footer_widgets', array(
70
+				'footer_widgets_background_color' => get_theme_mod('footer_widgets_background_color', $colors['footer_widgets_background_color']),
71
+				'footer_widgets_text_color'       => get_theme_mod('footer_widgets_text_color', $colors['footer_widgets_text_color']),
72
+				'footer_widgets_link_color'       => get_theme_mod('footer_widgets_link_color', $colors['footer_widgets_link_color']),
73
+				'footer_widgets_link_hover_color' => get_theme_mod('footer_widgets_link_hover_color', $colors['footer_widgets_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_widgets_background_color'] )
94
-				|| empty( $colors['footer_widgets_text_color'] )
95
-				|| empty( $colors['footer_widgets_link_color'] )
96
-				|| empty( $colors['footer_widgets_link_hover_color'] ) ) {
93
+			if (empty($colors['footer_widgets_background_color'])
94
+				|| empty($colors['footer_widgets_text_color'])
95
+				|| empty($colors['footer_widgets_link_color'])
96
+				|| empty($colors['footer_widgets_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_widgets', $css, $colors );
115
-			$css = parent::scss_to_css( $css );
114
+			$css = apply_filters('lsx_customizer_colour_selectors_footer_widgets', $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.
classes/class-lsx-customizer-colour-top-menu.php 1 patch
Spacing   +39 added lines, -39 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_Top_Menu' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Top_Menu')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Top Menu 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__top_menu_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__top_menu_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__top_menu_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__top_menu_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__top_menu_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__top_menu_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,17 +66,17 @@  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_top_menu', array(
70
-				'top_menu_background_color'          => get_theme_mod( 'top_menu_background_color',          $colors['top_menu_background_color'] ),
71
-				'top_menu_link_color'                => get_theme_mod( 'top_menu_link_color',                $colors['top_menu_link_color'] ),
72
-				'top_menu_link_hover_color'          => get_theme_mod( 'top_menu_link_hover_color',          $colors['top_menu_link_hover_color'] ),
73
-				'top_menu_icon_color'                => get_theme_mod( 'top_menu_icon_color',                $colors['top_menu_icon_color'] ),
74
-				'top_menu_icon_hover_color'          => get_theme_mod( 'top_menu_icon_hover_color',          $colors['top_menu_icon_hover_color'] ),
75
-				'top_menu_dropdown_color'            => get_theme_mod( 'top_menu_dropdown_color',            $colors['top_menu_dropdown_color'] ),
76
-				'top_menu_dropdown_hover_color'      => get_theme_mod( 'top_menu_dropdown_hover_color',      $colors['top_menu_dropdown_hover_color'] ),
77
-				'top_menu_dropdown_link_color'       => get_theme_mod( 'top_menu_dropdown_link_color',       $colors['top_menu_dropdown_link_color'] ),
78
-				'top_menu_dropdown_link_hover_color' => get_theme_mod( 'top_menu_dropdown_link_hover_color', $colors['top_menu_dropdown_link_hover_color'] ),
79
-			) );
69
+			return apply_filters('lsx_customizer_colours_top_menu', array(
70
+				'top_menu_background_color'          => get_theme_mod('top_menu_background_color', $colors['top_menu_background_color']),
71
+				'top_menu_link_color'                => get_theme_mod('top_menu_link_color', $colors['top_menu_link_color']),
72
+				'top_menu_link_hover_color'          => get_theme_mod('top_menu_link_hover_color', $colors['top_menu_link_hover_color']),
73
+				'top_menu_icon_color'                => get_theme_mod('top_menu_icon_color', $colors['top_menu_icon_color']),
74
+				'top_menu_icon_hover_color'          => get_theme_mod('top_menu_icon_hover_color', $colors['top_menu_icon_hover_color']),
75
+				'top_menu_dropdown_color'            => get_theme_mod('top_menu_dropdown_color', $colors['top_menu_dropdown_color']),
76
+				'top_menu_dropdown_hover_color'      => get_theme_mod('top_menu_dropdown_hover_color', $colors['top_menu_dropdown_hover_color']),
77
+				'top_menu_dropdown_link_color'       => get_theme_mod('top_menu_dropdown_link_color', $colors['top_menu_dropdown_link_color']),
78
+				'top_menu_dropdown_link_hover_color' => get_theme_mod('top_menu_dropdown_link_hover_color', $colors['top_menu_dropdown_link_hover_color']),
79
+			));
80 80
 		}
81 81
 
82 82
 		/**
@@ -84,26 +84,26 @@  discard block
 block discarded – undo
84 84
 		 *
85 85
 		 * @since 1.0.0
86 86
 		 */
87
-		function get_css( $colors ) {
87
+		function get_css($colors) {
88 88
 			global $customizer_colour_names;
89 89
 
90 90
 			$colors_template = array();
91 91
 
92
-			foreach ( $customizer_colour_names as $key => $value ) {
93
-				$colors_template[ $key ] = '';
92
+			foreach ($customizer_colour_names as $key => $value) {
93
+				$colors_template[$key] = '';
94 94
 			}
95 95
 
96
-			$colors = wp_parse_args( $colors, $colors_template );
97
-
98
-			if ( empty( $colors['top_menu_background_color'] )
99
-				|| empty( $colors['top_menu_link_color'] )
100
-				|| empty( $colors['top_menu_link_hover_color'] )
101
-				|| empty( $colors['top_menu_icon_color'] )
102
-				|| empty( $colors['top_menu_icon_hover_color'] )
103
-				|| empty( $colors['top_menu_dropdown_color'] )
104
-				|| empty( $colors['top_menu_dropdown_hover_color'] )
105
-				|| empty( $colors['top_menu_dropdown_link_color'] )
106
-				|| empty( $colors['top_menu_dropdown_link_hover_color'] ) ) {
96
+			$colors = wp_parse_args($colors, $colors_template);
97
+
98
+			if (empty($colors['top_menu_background_color'])
99
+				|| empty($colors['top_menu_link_color'])
100
+				|| empty($colors['top_menu_link_hover_color'])
101
+				|| empty($colors['top_menu_icon_color'])
102
+				|| empty($colors['top_menu_icon_hover_color'])
103
+				|| empty($colors['top_menu_dropdown_color'])
104
+				|| empty($colors['top_menu_dropdown_hover_color'])
105
+				|| empty($colors['top_menu_dropdown_link_color'])
106
+				|| empty($colors['top_menu_dropdown_link_hover_color'])) {
107 107
 				return '';
108 108
 			}
109 109
 
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 				);
127 127
 			';
128 128
 
129
-			$css = apply_filters( 'lsx_customizer_colour_selectors_top_menu', $css, $colors );
130
-			$css = parent::scss_to_css( $css );
129
+			$css = apply_filters('lsx_customizer_colour_selectors_top_menu', $css, $colors);
130
+			$css = parent::scss_to_css($css);
131 131
 
132 132
 			return $css;
133 133
 		}
Please login to merge, or discard this patch.
classes/class-lsx-customizer-colour-main-menu.php 1 patch
Spacing   +34 added lines, -34 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_Main_Menu' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Main_Menu')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Main Menu 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__main_menu_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__main_menu_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__main_menu_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__main_menu_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__main_menu_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__main_menu_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,15 +66,15 @@  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_main_menu', array(
70
-				'main_menu_background_color'                => get_theme_mod( 'main_menu_background_color',                $colors['main_menu_background_color'] ),
71
-				'main_menu_link_color'                      => get_theme_mod( 'main_menu_link_color',                      $colors['main_menu_link_color'] ),
72
-				'main_menu_link_hover_color'                => get_theme_mod( 'main_menu_link_hover_color',                $colors['main_menu_link_hover_color'] ),
73
-				'main_menu_dropdown_background_color'       => get_theme_mod( 'main_menu_dropdown_background_color',       $colors['main_menu_dropdown_background_color'] ),
74
-				'main_menu_dropdown_background_hover_color' => get_theme_mod( 'main_menu_dropdown_background_hover_color', $colors['main_menu_dropdown_background_hover_color'] ),
75
-				'main_menu_dropdown_link_color'             => get_theme_mod( 'main_menu_dropdown_link_color',             $colors['main_menu_dropdown_link_color'] ),
76
-				'main_menu_dropdown_link_hover_color'       => get_theme_mod( 'main_menu_dropdown_link_hover_color',       $colors['main_menu_dropdown_link_hover_color'] ),
77
-			) );
69
+			return apply_filters('lsx_customizer_colours_main_menu', array(
70
+				'main_menu_background_color'                => get_theme_mod('main_menu_background_color', $colors['main_menu_background_color']),
71
+				'main_menu_link_color'                      => get_theme_mod('main_menu_link_color', $colors['main_menu_link_color']),
72
+				'main_menu_link_hover_color'                => get_theme_mod('main_menu_link_hover_color', $colors['main_menu_link_hover_color']),
73
+				'main_menu_dropdown_background_color'       => get_theme_mod('main_menu_dropdown_background_color', $colors['main_menu_dropdown_background_color']),
74
+				'main_menu_dropdown_background_hover_color' => get_theme_mod('main_menu_dropdown_background_hover_color', $colors['main_menu_dropdown_background_hover_color']),
75
+				'main_menu_dropdown_link_color'             => get_theme_mod('main_menu_dropdown_link_color', $colors['main_menu_dropdown_link_color']),
76
+				'main_menu_dropdown_link_hover_color'       => get_theme_mod('main_menu_dropdown_link_hover_color', $colors['main_menu_dropdown_link_hover_color']),
77
+			));
78 78
 		}
79 79
 
80 80
 		/**
@@ -82,24 +82,24 @@  discard block
 block discarded – undo
82 82
 		 *
83 83
 		 * @since 1.0.0
84 84
 		 */
85
-		function get_css( $colors ) {
85
+		function get_css($colors) {
86 86
 			global $customizer_colour_names;
87 87
 
88 88
 			$colors_template = array();
89 89
 
90
-			foreach ( $customizer_colour_names as $key => $value ) {
91
-				$colors_template[ $key ] = '';
90
+			foreach ($customizer_colour_names as $key => $value) {
91
+				$colors_template[$key] = '';
92 92
 			}
93 93
 
94
-			$colors = wp_parse_args( $colors, $colors_template );
94
+			$colors = wp_parse_args($colors, $colors_template);
95 95
 
96
-			if ( empty( $colors['main_menu_background_color'] )
97
-				|| empty( $colors['main_menu_link_color'] )
98
-				|| empty( $colors['main_menu_link_hover_color'] )
99
-				|| empty( $colors['main_menu_dropdown_background_color'] )
100
-				|| empty( $colors['main_menu_dropdown_background_hover_color'] )
101
-				|| empty( $colors['main_menu_dropdown_link_color'] )
102
-				|| empty( $colors['main_menu_dropdown_link_hover_color'] ) ) {
96
+			if (empty($colors['main_menu_background_color'])
97
+				|| empty($colors['main_menu_link_color'])
98
+				|| empty($colors['main_menu_link_hover_color'])
99
+				|| empty($colors['main_menu_dropdown_background_color'])
100
+				|| empty($colors['main_menu_dropdown_background_hover_color'])
101
+				|| empty($colors['main_menu_dropdown_link_color'])
102
+				|| empty($colors['main_menu_dropdown_link_hover_color'])) {
103 103
 				return '';
104 104
 			}
105 105
 
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 				);
121 121
 			';
122 122
 
123
-			$css = apply_filters( 'lsx_customizer_colour_selectors_main_menu', $css, $colors );
124
-			$css = parent::scss_to_css( $css );
123
+			$css = apply_filters('lsx_customizer_colour_selectors_main_menu', $css, $colors);
124
+			$css = parent::scss_to_css($css);
125 125
 
126 126
 			return $css;
127 127
 		}
Please login to merge, or discard this patch.
classes/class-lsx-customizer-colour-button-cta.php 1 patch
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_CTA' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Button_CTA')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Button CTA 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_cta_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__button_cta_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_cta_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__button_cta_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_cta_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__button_cta_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_cta', array(
70
-				'button_cta_background_color'       => get_theme_mod( 'button_cta_background_color',       $colors['button_cta_background_color'] ),
71
-				'button_cta_background_hover_color' => get_theme_mod( 'button_cta_background_hover_color', $colors['button_cta_background_hover_color'] ),
72
-				'button_cta_text_color'             => get_theme_mod( 'button_cta_text_color',             $colors['button_cta_text_color'] ),
73
-				'button_cta_text_color_hover'       => get_theme_mod( 'button_cta_text_color_hover',       $colors['button_cta_text_color_hover'] ),
74
-				'button_cta_shadow'                 => get_theme_mod( 'button_cta_shadow',                 $colors['button_cta_shadow'] ),
75
-			) );
69
+			return apply_filters('lsx_customizer_colours_button_cta', array(
70
+				'button_cta_background_color'       => get_theme_mod('button_cta_background_color', $colors['button_cta_background_color']),
71
+				'button_cta_background_hover_color' => get_theme_mod('button_cta_background_hover_color', $colors['button_cta_background_hover_color']),
72
+				'button_cta_text_color'             => get_theme_mod('button_cta_text_color', $colors['button_cta_text_color']),
73
+				'button_cta_text_color_hover'       => get_theme_mod('button_cta_text_color_hover', $colors['button_cta_text_color_hover']),
74
+				'button_cta_shadow'                 => get_theme_mod('button_cta_shadow', $colors['button_cta_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_cta_text_color'] )
95
-				|| empty( $colors['button_cta_text_color_hover'] )
96
-				|| empty( $colors['button_cta_background_color'] )
97
-				|| empty( $colors['button_cta_background_hover_color'] )
98
-				|| empty( $colors['button_cta_shadow'] ) ) {
94
+			if (empty($colors['button_cta_text_color'])
95
+				|| empty($colors['button_cta_text_color_hover'])
96
+				|| empty($colors['button_cta_background_color'])
97
+				|| empty($colors['button_cta_background_hover_color'])
98
+				|| empty($colors['button_cta_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_cta', $css, $colors );
118
-			$css = parent::scss_to_css( $css );
117
+			$css = apply_filters('lsx_customizer_colour_selectors_button_cta', $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.
classes/class-lsx-customizer-colour-button-tertiary.php 1 patch
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_Tertiary' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Button_Tertiary')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Button Tertiary 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_tertiary_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__button_tertiary_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_tertiary_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__button_tertiary_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_tertiary_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__button_tertiary_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_tertiary', array(
70
-				'button_tertiary_background_color'       => get_theme_mod( 'button_tertiary_background_color',       $colors['button_tertiary_background_color'] ),
71
-				'button_tertiary_background_hover_color' => get_theme_mod( 'button_tertiary_background_hover_color', $colors['button_tertiary_background_hover_color'] ),
72
-				'button_tertiary_text_color'             => get_theme_mod( 'button_tertiary_text_color',             $colors['button_tertiary_text_color'] ),
73
-				'button_tertiary_text_color_hover'       => get_theme_mod( 'button_tertiary_text_color_hover',       $colors['button_tertiary_text_color_hover'] ),
74
-				'button_tertiary_shadow'                 => get_theme_mod( 'button_tertiary_shadow',                 $colors['button_tertiary_shadow'] ),
75
-			) );
69
+			return apply_filters('lsx_customizer_colours_button_tertiary', array(
70
+				'button_tertiary_background_color'       => get_theme_mod('button_tertiary_background_color', $colors['button_tertiary_background_color']),
71
+				'button_tertiary_background_hover_color' => get_theme_mod('button_tertiary_background_hover_color', $colors['button_tertiary_background_hover_color']),
72
+				'button_tertiary_text_color'             => get_theme_mod('button_tertiary_text_color', $colors['button_tertiary_text_color']),
73
+				'button_tertiary_text_color_hover'       => get_theme_mod('button_tertiary_text_color_hover', $colors['button_tertiary_text_color_hover']),
74
+				'button_tertiary_shadow'                 => get_theme_mod('button_tertiary_shadow', $colors['button_tertiary_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_tertiary_text_color'] )
95
-				|| empty( $colors['button_tertiary_text_color_hover'] )
96
-				|| empty( $colors['button_tertiary_background_color'] )
97
-				|| empty( $colors['button_tertiary_background_hover_color'] )
98
-				|| empty( $colors['button_tertiary_shadow'] ) ) {
94
+			if (empty($colors['button_tertiary_text_color'])
95
+				|| empty($colors['button_tertiary_text_color_hover'])
96
+				|| empty($colors['button_tertiary_background_color'])
97
+				|| empty($colors['button_tertiary_background_hover_color'])
98
+				|| empty($colors['button_tertiary_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_tertiary', $css, $colors );
118
-			$css = parent::scss_to_css( $css );
117
+			$css = apply_filters('lsx_customizer_colour_selectors_button_tertiary', $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.
classes/class-lsx-customizer-colour-header.php 1 patch
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_Header' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Header')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Header 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__header_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__header_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__header_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__header_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__header_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__header_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_header', array(
70
-				'header_background_color'  => get_theme_mod( 'header_background_color',  $colors['header_background_color'] ),
71
-				'header_link_color'        => get_theme_mod( 'header_link_color',        $colors['header_link_color'] ),
72
-				'header_link_hover_color'  => get_theme_mod( 'header_link_hover_color',  $colors['header_link_hover_color'] ),
73
-				'header_description_color' => get_theme_mod( 'header_description_color', $colors['header_description_color'] ),
74
-			) );
69
+			return apply_filters('lsx_customizer_colours_header', array(
70
+				'header_background_color'  => get_theme_mod('header_background_color', $colors['header_background_color']),
71
+				'header_link_color'        => get_theme_mod('header_link_color', $colors['header_link_color']),
72
+				'header_link_hover_color'  => get_theme_mod('header_link_hover_color', $colors['header_link_hover_color']),
73
+				'header_description_color' => get_theme_mod('header_description_color', $colors['header_description_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['header_background_color'] )
94
-				|| empty( $colors['header_link_color'] )
95
-				|| empty( $colors['header_link_hover_color'] )
96
-				|| empty( $colors['header_description_color'] ) ) {
93
+			if (empty($colors['header_background_color'])
94
+				|| empty($colors['header_link_color'])
95
+				|| empty($colors['header_link_hover_color'])
96
+				|| empty($colors['header_description_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_header', $css, $colors );
115
-			$css = parent::scss_to_css( $css );
114
+			$css = apply_filters('lsx_customizer_colour_selectors_header', $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.
classes/class-lsx-customizer-colour-footer-cta.php 1 patch
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_CTA' ) ) {
2
+if ( ! class_exists('LSX_Customizer_Colour_Footer_CTA')) {
3 3
 
4 4
 	/**
5 5
 	 * LSX Customizer Colour Footer CTA 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_cta_theme_mod', $styles );
36
+			set_theme_mod('lsx_customizer_colour__footer_cta_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_cta_theme_mod' );
45
+			$styles_from_theme_mod = get_theme_mod('lsx_customizer_colour__footer_cta_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_cta_theme_mod', $styles );
51
+				if (false === $styles_from_theme_mod) {
52
+					set_theme_mod('lsx_customizer_colour__footer_cta_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_cta', array(
70
-				'footer_cta_background_color' => get_theme_mod( 'footer_cta_background_color', $colors['footer_cta_background_color'] ),
71
-				'footer_cta_text_color'       => get_theme_mod( 'footer_cta_text_color',       $colors['footer_cta_text_color'] ),
72
-				'footer_cta_link_color'       => get_theme_mod( 'footer_cta_link_color',       $colors['footer_cta_link_color'] ),
73
-				'footer_cta_link_hover_color' => get_theme_mod( 'footer_cta_link_hover_color', $colors['footer_cta_link_hover_color'] ),
74
-			) );
69
+			return apply_filters('lsx_customizer_colours_footer_cta', array(
70
+				'footer_cta_background_color' => get_theme_mod('footer_cta_background_color', $colors['footer_cta_background_color']),
71
+				'footer_cta_text_color'       => get_theme_mod('footer_cta_text_color', $colors['footer_cta_text_color']),
72
+				'footer_cta_link_color'       => get_theme_mod('footer_cta_link_color', $colors['footer_cta_link_color']),
73
+				'footer_cta_link_hover_color' => get_theme_mod('footer_cta_link_hover_color', $colors['footer_cta_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_cta_background_color'] )
94
-				|| empty( $colors['footer_cta_text_color'] )
95
-				|| empty( $colors['footer_cta_link_color'] )
96
-				|| empty( $colors['footer_cta_link_hover_color'] ) ) {
93
+			if (empty($colors['footer_cta_background_color'])
94
+				|| empty($colors['footer_cta_text_color'])
95
+				|| empty($colors['footer_cta_link_color'])
96
+				|| empty($colors['footer_cta_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_cta', $css, $colors );
115
-			$css = parent::scss_to_css( $css );
114
+			$css = apply_filters('lsx_customizer_colour_selectors_footer_cta', $css, $colors);
115
+			$css = parent::scss_to_css($css);
116 116
 			return $css;
117 117
 		}
118 118
 
Please login to merge, or discard this patch.
classes/class-lsx-customizer-colour-button.php 1 patch
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.
classes/class-lsx-customizer-colour-footer.php 1 patch
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.