@@ -7,115 +7,115 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
10 | - exit; |
|
10 | + exit; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | if ( ! function_exists( 'lsx_customizer_layout_controls' ) ) : |
14 | 14 | |
15 | - /** |
|
16 | - * Returns an array of the layout panel. |
|
17 | - * |
|
18 | - * @package lsx |
|
19 | - * @subpackage customizer |
|
20 | - * |
|
21 | - * @return $lsx_controls array() |
|
22 | - */ |
|
23 | - function lsx_customizer_layout_controls( $lsx_controls ) { |
|
24 | - $lsx_controls['sections']['lsx-layout'] = array( |
|
25 | - 'title' => esc_html__( 'Layout', 'lsx' ), |
|
26 | - 'description' => esc_html__( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ), |
|
27 | - 'priority' => 22, |
|
28 | - ); |
|
29 | - |
|
30 | - $lsx_controls['settings']['lsx_header_layout'] = array( |
|
31 | - 'default' => 'inline', |
|
32 | - 'type' => 'theme_mod', |
|
33 | - 'transport' => 'postMessage', |
|
34 | - ); |
|
35 | - |
|
36 | - $lsx_controls['fields']['lsx_header_layout'] = array( |
|
37 | - 'label' => esc_html__( 'Header', 'lsx' ), |
|
38 | - 'section' => 'lsx-layout', |
|
39 | - 'control' => 'LSX_Customize_Header_Layout_Control', |
|
40 | - 'choices' => array( |
|
41 | - 'central', |
|
42 | - 'expanded', |
|
43 | - 'inline', |
|
44 | - ), |
|
45 | - ); |
|
46 | - |
|
47 | - $lsx_controls['settings']['lsx_header_mobile_layout'] = array( |
|
48 | - 'default' => 'navigation-bar', |
|
49 | - 'type' => 'theme_mod', |
|
50 | - 'transport' => 'postMessage', |
|
51 | - ); |
|
52 | - |
|
53 | - $lsx_controls['fields']['lsx_header_mobile_layout'] = array( |
|
54 | - 'label' => esc_html__( 'Mobile Header', 'lsx' ), |
|
55 | - 'section' => 'lsx-layout', |
|
56 | - 'control' => 'LSX_Customize_Mobile_Header_Layout_Control', |
|
57 | - 'choices' => array( |
|
58 | - 'navigation-bar', |
|
59 | - 'hamburger', |
|
60 | - ), |
|
61 | - ); |
|
62 | - |
|
63 | - $lsx_controls['settings']['lsx_layout'] = array( |
|
64 | - 'default' => '1c', |
|
65 | - 'type' => 'theme_mod', |
|
66 | - 'transport' => 'refresh', |
|
67 | - ); |
|
68 | - |
|
69 | - $lsx_controls['fields']['lsx_layout'] = array( |
|
70 | - 'label' => esc_html__( 'Body', 'lsx' ), |
|
71 | - 'section' => 'lsx-layout', |
|
72 | - 'control' => 'LSX_Customize_Layout_Control', |
|
73 | - 'choices' => array( |
|
74 | - '1c', |
|
75 | - '2cr', |
|
76 | - '2cl', |
|
77 | - ), |
|
78 | - ); |
|
79 | - |
|
80 | - $lsx_controls['settings']['lsx_header_fixed'] = array( |
|
81 | - 'default' => false, |
|
82 | - 'sanitize_callback' => 'lsx_sanitize_checkbox', |
|
83 | - 'transport' => 'postMessage', |
|
84 | - ); |
|
85 | - |
|
86 | - $lsx_controls['fields']['lsx_header_fixed'] = array( |
|
87 | - 'label' => esc_html__( 'Fixed Header', 'lsx' ), |
|
88 | - 'section' => 'lsx-layout', |
|
89 | - 'type' => 'checkbox', |
|
90 | - ); |
|
91 | - |
|
92 | - $lsx_controls['settings']['lsx_header_search'] = array( |
|
93 | - 'default' => false, |
|
94 | - 'sanitize_callback' => 'lsx_sanitize_checkbox', |
|
95 | - 'transport' => 'postMessage', |
|
96 | - ); |
|
97 | - |
|
98 | - $lsx_controls['fields']['lsx_header_search'] = array( |
|
99 | - 'label' => esc_html__( 'Search Box in Header', 'lsx' ), |
|
100 | - 'section' => 'lsx-layout', |
|
101 | - 'type' => 'checkbox', |
|
102 | - ); |
|
103 | - |
|
104 | - $lsx_controls['selective_refresh']['lsx_header_search'] = array( |
|
105 | - 'selector' => '#lsx-header-search-css', |
|
106 | - 'render_callback' => function() { |
|
107 | - $search_form = get_theme_mod( 'lsx_header_search' ); |
|
108 | - |
|
109 | - if ( false !== $search_form ) { |
|
110 | - echo 'body #searchform { display: block; }'; |
|
111 | - } else { |
|
112 | - echo 'body #searchform { display: none; }'; |
|
113 | - } |
|
114 | - }, |
|
115 | - ); |
|
116 | - |
|
117 | - return $lsx_controls; |
|
118 | - } |
|
15 | + /** |
|
16 | + * Returns an array of the layout panel. |
|
17 | + * |
|
18 | + * @package lsx |
|
19 | + * @subpackage customizer |
|
20 | + * |
|
21 | + * @return $lsx_controls array() |
|
22 | + */ |
|
23 | + function lsx_customizer_layout_controls( $lsx_controls ) { |
|
24 | + $lsx_controls['sections']['lsx-layout'] = array( |
|
25 | + 'title' => esc_html__( 'Layout', 'lsx' ), |
|
26 | + 'description' => esc_html__( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ), |
|
27 | + 'priority' => 22, |
|
28 | + ); |
|
29 | + |
|
30 | + $lsx_controls['settings']['lsx_header_layout'] = array( |
|
31 | + 'default' => 'inline', |
|
32 | + 'type' => 'theme_mod', |
|
33 | + 'transport' => 'postMessage', |
|
34 | + ); |
|
35 | + |
|
36 | + $lsx_controls['fields']['lsx_header_layout'] = array( |
|
37 | + 'label' => esc_html__( 'Header', 'lsx' ), |
|
38 | + 'section' => 'lsx-layout', |
|
39 | + 'control' => 'LSX_Customize_Header_Layout_Control', |
|
40 | + 'choices' => array( |
|
41 | + 'central', |
|
42 | + 'expanded', |
|
43 | + 'inline', |
|
44 | + ), |
|
45 | + ); |
|
46 | + |
|
47 | + $lsx_controls['settings']['lsx_header_mobile_layout'] = array( |
|
48 | + 'default' => 'navigation-bar', |
|
49 | + 'type' => 'theme_mod', |
|
50 | + 'transport' => 'postMessage', |
|
51 | + ); |
|
52 | + |
|
53 | + $lsx_controls['fields']['lsx_header_mobile_layout'] = array( |
|
54 | + 'label' => esc_html__( 'Mobile Header', 'lsx' ), |
|
55 | + 'section' => 'lsx-layout', |
|
56 | + 'control' => 'LSX_Customize_Mobile_Header_Layout_Control', |
|
57 | + 'choices' => array( |
|
58 | + 'navigation-bar', |
|
59 | + 'hamburger', |
|
60 | + ), |
|
61 | + ); |
|
62 | + |
|
63 | + $lsx_controls['settings']['lsx_layout'] = array( |
|
64 | + 'default' => '1c', |
|
65 | + 'type' => 'theme_mod', |
|
66 | + 'transport' => 'refresh', |
|
67 | + ); |
|
68 | + |
|
69 | + $lsx_controls['fields']['lsx_layout'] = array( |
|
70 | + 'label' => esc_html__( 'Body', 'lsx' ), |
|
71 | + 'section' => 'lsx-layout', |
|
72 | + 'control' => 'LSX_Customize_Layout_Control', |
|
73 | + 'choices' => array( |
|
74 | + '1c', |
|
75 | + '2cr', |
|
76 | + '2cl', |
|
77 | + ), |
|
78 | + ); |
|
79 | + |
|
80 | + $lsx_controls['settings']['lsx_header_fixed'] = array( |
|
81 | + 'default' => false, |
|
82 | + 'sanitize_callback' => 'lsx_sanitize_checkbox', |
|
83 | + 'transport' => 'postMessage', |
|
84 | + ); |
|
85 | + |
|
86 | + $lsx_controls['fields']['lsx_header_fixed'] = array( |
|
87 | + 'label' => esc_html__( 'Fixed Header', 'lsx' ), |
|
88 | + 'section' => 'lsx-layout', |
|
89 | + 'type' => 'checkbox', |
|
90 | + ); |
|
91 | + |
|
92 | + $lsx_controls['settings']['lsx_header_search'] = array( |
|
93 | + 'default' => false, |
|
94 | + 'sanitize_callback' => 'lsx_sanitize_checkbox', |
|
95 | + 'transport' => 'postMessage', |
|
96 | + ); |
|
97 | + |
|
98 | + $lsx_controls['fields']['lsx_header_search'] = array( |
|
99 | + 'label' => esc_html__( 'Search Box in Header', 'lsx' ), |
|
100 | + 'section' => 'lsx-layout', |
|
101 | + 'type' => 'checkbox', |
|
102 | + ); |
|
103 | + |
|
104 | + $lsx_controls['selective_refresh']['lsx_header_search'] = array( |
|
105 | + 'selector' => '#lsx-header-search-css', |
|
106 | + 'render_callback' => function() { |
|
107 | + $search_form = get_theme_mod( 'lsx_header_search' ); |
|
108 | + |
|
109 | + if ( false !== $search_form ) { |
|
110 | + echo 'body #searchform { display: block; }'; |
|
111 | + } else { |
|
112 | + echo 'body #searchform { display: none; }'; |
|
113 | + } |
|
114 | + }, |
|
115 | + ); |
|
116 | + |
|
117 | + return $lsx_controls; |
|
118 | + } |
|
119 | 119 | |
120 | 120 | endif; |
121 | 121 | |
@@ -123,110 +123,110 @@ discard block |
||
123 | 123 | |
124 | 124 | if ( ! function_exists( 'lsx_customizer_template_cover_controls' ) ) : |
125 | 125 | |
126 | - /** |
|
127 | - * Returns an array of the Cover Template panel. |
|
128 | - * |
|
129 | - * @package lsx |
|
130 | - * @subpackage customizer |
|
131 | - * |
|
132 | - * @return $lsx_controls array() |
|
133 | - */ |
|
134 | - function lsx_customizer_template_cover_controls( $lsx_controls ) { |
|
135 | - $lsx_controls['sections']['lsx-cover-template'] = array( |
|
136 | - 'title' => esc_html__( 'Cover Template Settings', 'lsx' ), |
|
137 | - 'description' => esc_html__( 'Change the cover template settings.', 'lsx' ), |
|
138 | - 'priority' => 23, |
|
139 | - ); |
|
140 | - |
|
141 | - $lsx_controls['settings']['lsx_cover_template_fixed_background'] = array( |
|
142 | - 'default' => '1', |
|
143 | - 'sanitize_callback' => 'lsx_sanitize_checkbox', |
|
144 | - 'transport' => 'postMessage', |
|
145 | - ); |
|
146 | - |
|
147 | - $lsx_controls['fields']['lsx_cover_template_fixed_background'] = array( |
|
148 | - 'label' => esc_html__( 'Fixed Background Image', 'lsx' ), |
|
149 | - 'section' => 'lsx-cover-template', |
|
150 | - 'type' => 'checkbox', |
|
151 | - ); |
|
152 | - |
|
153 | - $lsx_controls['settings']['lsx_cover_template_cover_background_color'] = array( |
|
154 | - 'default' => '#000000', |
|
155 | - 'sanitize_callback' => 'sanitize_hex_color', |
|
156 | - 'type' => 'theme_mod', |
|
157 | - 'transport' => 'postMessage', |
|
158 | - ); |
|
159 | - |
|
160 | - $lsx_controls['fields']['lsx_cover_template_cover_background_color'] = array( |
|
161 | - 'label' => esc_html__( 'Cover Background Colour', 'lsx' ), |
|
162 | - 'description' => __( 'The colour used for the cover background, for post or pages without featured image. Defaults to #27639e.', 'lsx' ), |
|
163 | - 'section' => 'lsx-cover-template', |
|
164 | - 'control' => 'WP_Customize_Color_Control', |
|
165 | - ); |
|
166 | - |
|
167 | - $lsx_controls['settings']['lsx_cover_template_overlay_background_color'] = array( |
|
168 | - 'default' => '#000000', |
|
169 | - 'sanitize_callback' => 'sanitize_hex_color', |
|
170 | - 'type' => 'theme_mod', |
|
171 | - 'transport' => 'postMessage', |
|
172 | - ); |
|
173 | - |
|
174 | - $lsx_controls['fields']['lsx_cover_template_overlay_background_color'] = array( |
|
175 | - 'label' => esc_html__( 'Overlay Background Color', 'lsx' ), |
|
176 | - 'description' => __( 'The color used for the overlay. Defaults to black.', 'lsx' ), |
|
177 | - 'section' => 'lsx-cover-template', |
|
178 | - 'control' => 'WP_Customize_Color_Control', |
|
179 | - ); |
|
180 | - |
|
181 | - $lsx_controls['settings']['lsx_cover_template_overlay_text_color'] = array( |
|
182 | - 'default' => '#ffffff', |
|
183 | - 'sanitize_callback' => 'sanitize_hex_color', |
|
184 | - 'type' => 'theme_mod', |
|
185 | - 'transport' => 'postMessage', |
|
186 | - ); |
|
187 | - |
|
188 | - $lsx_controls['fields']['lsx_cover_template_overlay_text_color'] = ( |
|
189 | - array( |
|
190 | - 'label' => __( 'Overlay Text Color', 'lsx' ), |
|
191 | - 'description' => __( 'The color used for the text in the overlay.', 'lsx' ), |
|
192 | - 'section' => 'lsx-cover-template', |
|
193 | - 'control' => 'WP_Customize_Color_Control', |
|
194 | - ) |
|
195 | - ); |
|
196 | - |
|
197 | - $lsx_controls['settings']['lsx_cover_template_menu_text_color'] = array( |
|
198 | - 'default' => '#ffffff', |
|
199 | - 'sanitize_callback' => 'sanitize_hex_color', |
|
200 | - 'type' => 'theme_mod', |
|
201 | - 'transport' => 'postMessage', |
|
202 | - ); |
|
203 | - |
|
204 | - $lsx_controls['fields']['lsx_cover_template_menu_text_color'] = ( |
|
205 | - array( |
|
206 | - 'label' => __( 'Menu Text Color', 'lsx' ), |
|
207 | - 'description' => __( 'The color used for the text in the nav menu.', 'lsx' ), |
|
208 | - 'section' => 'lsx-cover-template', |
|
209 | - 'control' => 'WP_Customize_Color_Control', |
|
210 | - ) |
|
211 | - ); |
|
212 | - |
|
213 | - $lsx_controls['settings']['lsx_cover_template_overlay_opacity'] = array( |
|
214 | - 'default' => 80, |
|
215 | - 'sanitize_callback' => 'absint', |
|
216 | - 'transport' => 'postMessage', |
|
217 | - ); |
|
218 | - |
|
219 | - $lsx_controls['fields']['lsx_cover_template_overlay_opacity'] = ( |
|
220 | - array( |
|
221 | - 'label' => __( 'Overlay Opacity', 'lsx' ), |
|
222 | - 'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'lsx' ), |
|
223 | - 'section' => 'lsx-cover-template', |
|
224 | - 'type' => 'range', |
|
225 | - ) |
|
226 | - ); |
|
227 | - |
|
228 | - return $lsx_controls; |
|
229 | - } |
|
126 | + /** |
|
127 | + * Returns an array of the Cover Template panel. |
|
128 | + * |
|
129 | + * @package lsx |
|
130 | + * @subpackage customizer |
|
131 | + * |
|
132 | + * @return $lsx_controls array() |
|
133 | + */ |
|
134 | + function lsx_customizer_template_cover_controls( $lsx_controls ) { |
|
135 | + $lsx_controls['sections']['lsx-cover-template'] = array( |
|
136 | + 'title' => esc_html__( 'Cover Template Settings', 'lsx' ), |
|
137 | + 'description' => esc_html__( 'Change the cover template settings.', 'lsx' ), |
|
138 | + 'priority' => 23, |
|
139 | + ); |
|
140 | + |
|
141 | + $lsx_controls['settings']['lsx_cover_template_fixed_background'] = array( |
|
142 | + 'default' => '1', |
|
143 | + 'sanitize_callback' => 'lsx_sanitize_checkbox', |
|
144 | + 'transport' => 'postMessage', |
|
145 | + ); |
|
146 | + |
|
147 | + $lsx_controls['fields']['lsx_cover_template_fixed_background'] = array( |
|
148 | + 'label' => esc_html__( 'Fixed Background Image', 'lsx' ), |
|
149 | + 'section' => 'lsx-cover-template', |
|
150 | + 'type' => 'checkbox', |
|
151 | + ); |
|
152 | + |
|
153 | + $lsx_controls['settings']['lsx_cover_template_cover_background_color'] = array( |
|
154 | + 'default' => '#000000', |
|
155 | + 'sanitize_callback' => 'sanitize_hex_color', |
|
156 | + 'type' => 'theme_mod', |
|
157 | + 'transport' => 'postMessage', |
|
158 | + ); |
|
159 | + |
|
160 | + $lsx_controls['fields']['lsx_cover_template_cover_background_color'] = array( |
|
161 | + 'label' => esc_html__( 'Cover Background Colour', 'lsx' ), |
|
162 | + 'description' => __( 'The colour used for the cover background, for post or pages without featured image. Defaults to #27639e.', 'lsx' ), |
|
163 | + 'section' => 'lsx-cover-template', |
|
164 | + 'control' => 'WP_Customize_Color_Control', |
|
165 | + ); |
|
166 | + |
|
167 | + $lsx_controls['settings']['lsx_cover_template_overlay_background_color'] = array( |
|
168 | + 'default' => '#000000', |
|
169 | + 'sanitize_callback' => 'sanitize_hex_color', |
|
170 | + 'type' => 'theme_mod', |
|
171 | + 'transport' => 'postMessage', |
|
172 | + ); |
|
173 | + |
|
174 | + $lsx_controls['fields']['lsx_cover_template_overlay_background_color'] = array( |
|
175 | + 'label' => esc_html__( 'Overlay Background Color', 'lsx' ), |
|
176 | + 'description' => __( 'The color used for the overlay. Defaults to black.', 'lsx' ), |
|
177 | + 'section' => 'lsx-cover-template', |
|
178 | + 'control' => 'WP_Customize_Color_Control', |
|
179 | + ); |
|
180 | + |
|
181 | + $lsx_controls['settings']['lsx_cover_template_overlay_text_color'] = array( |
|
182 | + 'default' => '#ffffff', |
|
183 | + 'sanitize_callback' => 'sanitize_hex_color', |
|
184 | + 'type' => 'theme_mod', |
|
185 | + 'transport' => 'postMessage', |
|
186 | + ); |
|
187 | + |
|
188 | + $lsx_controls['fields']['lsx_cover_template_overlay_text_color'] = ( |
|
189 | + array( |
|
190 | + 'label' => __( 'Overlay Text Color', 'lsx' ), |
|
191 | + 'description' => __( 'The color used for the text in the overlay.', 'lsx' ), |
|
192 | + 'section' => 'lsx-cover-template', |
|
193 | + 'control' => 'WP_Customize_Color_Control', |
|
194 | + ) |
|
195 | + ); |
|
196 | + |
|
197 | + $lsx_controls['settings']['lsx_cover_template_menu_text_color'] = array( |
|
198 | + 'default' => '#ffffff', |
|
199 | + 'sanitize_callback' => 'sanitize_hex_color', |
|
200 | + 'type' => 'theme_mod', |
|
201 | + 'transport' => 'postMessage', |
|
202 | + ); |
|
203 | + |
|
204 | + $lsx_controls['fields']['lsx_cover_template_menu_text_color'] = ( |
|
205 | + array( |
|
206 | + 'label' => __( 'Menu Text Color', 'lsx' ), |
|
207 | + 'description' => __( 'The color used for the text in the nav menu.', 'lsx' ), |
|
208 | + 'section' => 'lsx-cover-template', |
|
209 | + 'control' => 'WP_Customize_Color_Control', |
|
210 | + ) |
|
211 | + ); |
|
212 | + |
|
213 | + $lsx_controls['settings']['lsx_cover_template_overlay_opacity'] = array( |
|
214 | + 'default' => 80, |
|
215 | + 'sanitize_callback' => 'absint', |
|
216 | + 'transport' => 'postMessage', |
|
217 | + ); |
|
218 | + |
|
219 | + $lsx_controls['fields']['lsx_cover_template_overlay_opacity'] = ( |
|
220 | + array( |
|
221 | + 'label' => __( 'Overlay Opacity', 'lsx' ), |
|
222 | + 'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'lsx' ), |
|
223 | + 'section' => 'lsx-cover-template', |
|
224 | + 'type' => 'range', |
|
225 | + ) |
|
226 | + ); |
|
227 | + |
|
228 | + return $lsx_controls; |
|
229 | + } |
|
230 | 230 | |
231 | 231 | endif; |
232 | 232 | |
@@ -235,19 +235,19 @@ discard block |
||
235 | 235 | |
236 | 236 | if ( ! function_exists( 'lsx_get_customizer_controls' ) ) : |
237 | 237 | |
238 | - /** |
|
239 | - * Returns an array of $controls for the customizer class to generate. |
|
240 | - * |
|
241 | - * @package lsx |
|
242 | - * @subpackage customizer |
|
243 | - * |
|
244 | - * @return $lsx_controls array() |
|
245 | - */ |
|
246 | - function lsx_get_customizer_controls() { |
|
247 | - $lsx_controls = array(); |
|
248 | - $lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls ); |
|
249 | - return $lsx_controls; |
|
250 | - } |
|
238 | + /** |
|
239 | + * Returns an array of $controls for the customizer class to generate. |
|
240 | + * |
|
241 | + * @package lsx |
|
242 | + * @subpackage customizer |
|
243 | + * |
|
244 | + * @return $lsx_controls array() |
|
245 | + */ |
|
246 | + function lsx_get_customizer_controls() { |
|
247 | + $lsx_controls = array(); |
|
248 | + $lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls ); |
|
249 | + return $lsx_controls; |
|
250 | + } |
|
251 | 251 | |
252 | 252 | endif; |
253 | 253 |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | * @subpackage customizer |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
13 | -if ( ! function_exists( 'lsx_customizer_layout_controls' ) ) : |
|
13 | +if ( ! function_exists('lsx_customizer_layout_controls')) : |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Returns an array of the layout panel. |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | * |
21 | 21 | * @return $lsx_controls array() |
22 | 22 | */ |
23 | - function lsx_customizer_layout_controls( $lsx_controls ) { |
|
23 | + function lsx_customizer_layout_controls($lsx_controls) { |
|
24 | 24 | $lsx_controls['sections']['lsx-layout'] = array( |
25 | - 'title' => esc_html__( 'Layout', 'lsx' ), |
|
26 | - 'description' => esc_html__( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ), |
|
25 | + 'title' => esc_html__('Layout', 'lsx'), |
|
26 | + 'description' => esc_html__('Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx'), |
|
27 | 27 | 'priority' => 22, |
28 | 28 | ); |
29 | 29 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ); |
35 | 35 | |
36 | 36 | $lsx_controls['fields']['lsx_header_layout'] = array( |
37 | - 'label' => esc_html__( 'Header', 'lsx' ), |
|
37 | + 'label' => esc_html__('Header', 'lsx'), |
|
38 | 38 | 'section' => 'lsx-layout', |
39 | 39 | 'control' => 'LSX_Customize_Header_Layout_Control', |
40 | 40 | 'choices' => array( |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | ); |
52 | 52 | |
53 | 53 | $lsx_controls['fields']['lsx_header_mobile_layout'] = array( |
54 | - 'label' => esc_html__( 'Mobile Header', 'lsx' ), |
|
54 | + 'label' => esc_html__('Mobile Header', 'lsx'), |
|
55 | 55 | 'section' => 'lsx-layout', |
56 | 56 | 'control' => 'LSX_Customize_Mobile_Header_Layout_Control', |
57 | 57 | 'choices' => array( |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | ); |
68 | 68 | |
69 | 69 | $lsx_controls['fields']['lsx_layout'] = array( |
70 | - 'label' => esc_html__( 'Body', 'lsx' ), |
|
70 | + 'label' => esc_html__('Body', 'lsx'), |
|
71 | 71 | 'section' => 'lsx-layout', |
72 | 72 | 'control' => 'LSX_Customize_Layout_Control', |
73 | 73 | 'choices' => array( |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ); |
85 | 85 | |
86 | 86 | $lsx_controls['fields']['lsx_header_fixed'] = array( |
87 | - 'label' => esc_html__( 'Fixed Header', 'lsx' ), |
|
87 | + 'label' => esc_html__('Fixed Header', 'lsx'), |
|
88 | 88 | 'section' => 'lsx-layout', |
89 | 89 | 'type' => 'checkbox', |
90 | 90 | ); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | ); |
97 | 97 | |
98 | 98 | $lsx_controls['fields']['lsx_header_search'] = array( |
99 | - 'label' => esc_html__( 'Search Box in Header', 'lsx' ), |
|
99 | + 'label' => esc_html__('Search Box in Header', 'lsx'), |
|
100 | 100 | 'section' => 'lsx-layout', |
101 | 101 | 'type' => 'checkbox', |
102 | 102 | ); |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | $lsx_controls['selective_refresh']['lsx_header_search'] = array( |
105 | 105 | 'selector' => '#lsx-header-search-css', |
106 | 106 | 'render_callback' => function() { |
107 | - $search_form = get_theme_mod( 'lsx_header_search' ); |
|
107 | + $search_form = get_theme_mod('lsx_header_search'); |
|
108 | 108 | |
109 | - if ( false !== $search_form ) { |
|
109 | + if (false !== $search_form) { |
|
110 | 110 | echo 'body #searchform { display: block; }'; |
111 | 111 | } else { |
112 | 112 | echo 'body #searchform { display: none; }'; |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | |
120 | 120 | endif; |
121 | 121 | |
122 | -add_filter( 'lsx_customizer_controls', 'lsx_customizer_layout_controls' ); |
|
122 | +add_filter('lsx_customizer_controls', 'lsx_customizer_layout_controls'); |
|
123 | 123 | |
124 | -if ( ! function_exists( 'lsx_customizer_template_cover_controls' ) ) : |
|
124 | +if ( ! function_exists('lsx_customizer_template_cover_controls')) : |
|
125 | 125 | |
126 | 126 | /** |
127 | 127 | * Returns an array of the Cover Template panel. |
@@ -131,10 +131,10 @@ discard block |
||
131 | 131 | * |
132 | 132 | * @return $lsx_controls array() |
133 | 133 | */ |
134 | - function lsx_customizer_template_cover_controls( $lsx_controls ) { |
|
134 | + function lsx_customizer_template_cover_controls($lsx_controls) { |
|
135 | 135 | $lsx_controls['sections']['lsx-cover-template'] = array( |
136 | - 'title' => esc_html__( 'Cover Template Settings', 'lsx' ), |
|
137 | - 'description' => esc_html__( 'Change the cover template settings.', 'lsx' ), |
|
136 | + 'title' => esc_html__('Cover Template Settings', 'lsx'), |
|
137 | + 'description' => esc_html__('Change the cover template settings.', 'lsx'), |
|
138 | 138 | 'priority' => 23, |
139 | 139 | ); |
140 | 140 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | ); |
146 | 146 | |
147 | 147 | $lsx_controls['fields']['lsx_cover_template_fixed_background'] = array( |
148 | - 'label' => esc_html__( 'Fixed Background Image', 'lsx' ), |
|
148 | + 'label' => esc_html__('Fixed Background Image', 'lsx'), |
|
149 | 149 | 'section' => 'lsx-cover-template', |
150 | 150 | 'type' => 'checkbox', |
151 | 151 | ); |
@@ -158,8 +158,8 @@ discard block |
||
158 | 158 | ); |
159 | 159 | |
160 | 160 | $lsx_controls['fields']['lsx_cover_template_cover_background_color'] = array( |
161 | - 'label' => esc_html__( 'Cover Background Colour', 'lsx' ), |
|
162 | - 'description' => __( 'The colour used for the cover background, for post or pages without featured image. Defaults to #27639e.', 'lsx' ), |
|
161 | + 'label' => esc_html__('Cover Background Colour', 'lsx'), |
|
162 | + 'description' => __('The colour used for the cover background, for post or pages without featured image. Defaults to #27639e.', 'lsx'), |
|
163 | 163 | 'section' => 'lsx-cover-template', |
164 | 164 | 'control' => 'WP_Customize_Color_Control', |
165 | 165 | ); |
@@ -172,8 +172,8 @@ discard block |
||
172 | 172 | ); |
173 | 173 | |
174 | 174 | $lsx_controls['fields']['lsx_cover_template_overlay_background_color'] = array( |
175 | - 'label' => esc_html__( 'Overlay Background Color', 'lsx' ), |
|
176 | - 'description' => __( 'The color used for the overlay. Defaults to black.', 'lsx' ), |
|
175 | + 'label' => esc_html__('Overlay Background Color', 'lsx'), |
|
176 | + 'description' => __('The color used for the overlay. Defaults to black.', 'lsx'), |
|
177 | 177 | 'section' => 'lsx-cover-template', |
178 | 178 | 'control' => 'WP_Customize_Color_Control', |
179 | 179 | ); |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | |
188 | 188 | $lsx_controls['fields']['lsx_cover_template_overlay_text_color'] = ( |
189 | 189 | array( |
190 | - 'label' => __( 'Overlay Text Color', 'lsx' ), |
|
191 | - 'description' => __( 'The color used for the text in the overlay.', 'lsx' ), |
|
190 | + 'label' => __('Overlay Text Color', 'lsx'), |
|
191 | + 'description' => __('The color used for the text in the overlay.', 'lsx'), |
|
192 | 192 | 'section' => 'lsx-cover-template', |
193 | 193 | 'control' => 'WP_Customize_Color_Control', |
194 | 194 | ) |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | |
204 | 204 | $lsx_controls['fields']['lsx_cover_template_menu_text_color'] = ( |
205 | 205 | array( |
206 | - 'label' => __( 'Menu Text Color', 'lsx' ), |
|
207 | - 'description' => __( 'The color used for the text in the nav menu.', 'lsx' ), |
|
206 | + 'label' => __('Menu Text Color', 'lsx'), |
|
207 | + 'description' => __('The color used for the text in the nav menu.', 'lsx'), |
|
208 | 208 | 'section' => 'lsx-cover-template', |
209 | 209 | 'control' => 'WP_Customize_Color_Control', |
210 | 210 | ) |
@@ -218,8 +218,8 @@ discard block |
||
218 | 218 | |
219 | 219 | $lsx_controls['fields']['lsx_cover_template_overlay_opacity'] = ( |
220 | 220 | array( |
221 | - 'label' => __( 'Overlay Opacity', 'lsx' ), |
|
222 | - 'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'lsx' ), |
|
221 | + 'label' => __('Overlay Opacity', 'lsx'), |
|
222 | + 'description' => __('Make sure that the contrast is high enough so that the text is readable.', 'lsx'), |
|
223 | 223 | 'section' => 'lsx-cover-template', |
224 | 224 | 'type' => 'range', |
225 | 225 | ) |
@@ -230,10 +230,10 @@ discard block |
||
230 | 230 | |
231 | 231 | endif; |
232 | 232 | |
233 | -add_filter( 'lsx_customizer_controls', 'lsx_customizer_template_cover_controls' ); |
|
233 | +add_filter('lsx_customizer_controls', 'lsx_customizer_template_cover_controls'); |
|
234 | 234 | |
235 | 235 | |
236 | -if ( ! function_exists( 'lsx_get_customizer_controls' ) ) : |
|
236 | +if ( ! function_exists('lsx_get_customizer_controls')) : |
|
237 | 237 | |
238 | 238 | /** |
239 | 239 | * Returns an array of $controls for the customizer class to generate. |
@@ -245,10 +245,10 @@ discard block |
||
245 | 245 | */ |
246 | 246 | function lsx_get_customizer_controls() { |
247 | 247 | $lsx_controls = array(); |
248 | - $lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls ); |
|
248 | + $lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls); |
|
249 | 249 | return $lsx_controls; |
250 | 250 | } |
251 | 251 | |
252 | 252 | endif; |
253 | 253 | |
254 | -$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() ); |
|
254 | +$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls()); |