@@ -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_overlay_background_color'] = array( |
161 | - 'label' => esc_html__( 'Overlay Background Color', 'lsx' ), |
|
162 | - 'description' => __( 'The color used for the overlay. Defaults to black.', 'lsx' ), |
|
161 | + 'label' => esc_html__('Overlay Background Color', 'lsx'), |
|
162 | + 'description' => __('The color used for the overlay. Defaults to black.', 'lsx'), |
|
163 | 163 | 'section' => 'lsx-cover-template', |
164 | 164 | 'control' => 'WP_Customize_Color_Control', |
165 | 165 | ); |
@@ -173,8 +173,8 @@ discard block |
||
173 | 173 | |
174 | 174 | $lsx_controls['fields']['lsx_cover_template_overlay_text_color'] = ( |
175 | 175 | array( |
176 | - 'label' => __( 'Overlay Text Color', 'lsx' ), |
|
177 | - 'description' => __( 'The color used for the text in the overlay.', 'lsx' ), |
|
176 | + 'label' => __('Overlay Text Color', 'lsx'), |
|
177 | + 'description' => __('The color used for the text in the overlay.', 'lsx'), |
|
178 | 178 | 'section' => 'lsx-cover-template', |
179 | 179 | 'control' => 'WP_Customize_Color_Control', |
180 | 180 | ) |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | |
189 | 189 | $lsx_controls['fields']['lsx_cover_template_overlay_opacity'] = ( |
190 | 190 | array( |
191 | - 'label' => __( 'Overlay Opacity', 'lsx' ), |
|
192 | - 'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'lsx' ), |
|
191 | + 'label' => __('Overlay Opacity', 'lsx'), |
|
192 | + 'description' => __('Make sure that the contrast is high enough so that the text is readable.', 'lsx'), |
|
193 | 193 | 'section' => 'lsx-cover-template', |
194 | 194 | 'type' => 'range', |
195 | 195 | ) |
@@ -200,10 +200,10 @@ discard block |
||
200 | 200 | |
201 | 201 | endif; |
202 | 202 | |
203 | -add_filter( 'lsx_customizer_controls', 'lsx_customizer_template_cover_controls' ); |
|
203 | +add_filter('lsx_customizer_controls', 'lsx_customizer_template_cover_controls'); |
|
204 | 204 | |
205 | 205 | |
206 | -if ( ! function_exists( 'lsx_get_customizer_controls' ) ) : |
|
206 | +if ( ! function_exists('lsx_get_customizer_controls')) : |
|
207 | 207 | |
208 | 208 | /** |
209 | 209 | * Returns an array of $controls for the customizer class to generate. |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | */ |
216 | 216 | function lsx_get_customizer_controls() { |
217 | 217 | $lsx_controls = array(); |
218 | - $lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls ); |
|
218 | + $lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls); |
|
219 | 219 | return $lsx_controls; |
220 | 220 | } |
221 | 221 | |
222 | 222 | endif; |
223 | 223 | |
224 | -$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() ); |
|
224 | +$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls()); |