@@ -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_fixed'] = array( |
| 37 | - 'label' => esc_html__( 'Fixed Header', 'lsx' ), |
|
| 37 | + 'label' => esc_html__('Fixed Header', 'lsx'), |
|
| 38 | 38 | 'section' => 'lsx-layout', |
| 39 | 39 | 'type' => 'checkbox', |
| 40 | 40 | ); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | 48 | $lsx_controls['fields']['lsx_header_search'] = array( |
| 49 | - 'label' => esc_html__( 'Search Box in Header', 'lsx' ), |
|
| 49 | + 'label' => esc_html__('Search Box in Header', 'lsx'), |
|
| 50 | 50 | 'section' => 'lsx-layout', |
| 51 | 51 | 'type' => 'checkbox', |
| 52 | 52 | ); |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | $lsx_controls['selective_refresh']['lsx_header_search'] = array( |
| 55 | 55 | 'selector' => '#lsx-header-search-css', |
| 56 | 56 | 'render_callback' => function() { |
| 57 | - $search_form = get_theme_mod( 'lsx_header_search' ); |
|
| 57 | + $search_form = get_theme_mod('lsx_header_search'); |
|
| 58 | 58 | |
| 59 | - if ( false !== $search_form ) { |
|
| 59 | + if (false !== $search_form) { |
|
| 60 | 60 | echo 'body #searchform { display: block; }'; |
| 61 | 61 | } else { |
| 62 | 62 | echo 'body #searchform { display: none; }'; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | ); |
| 72 | 72 | |
| 73 | 73 | $lsx_controls['fields']['lsx_header_layout'] = array( |
| 74 | - 'label' => esc_html__( 'Header', 'lsx' ), |
|
| 74 | + 'label' => esc_html__('Header', 'lsx'), |
|
| 75 | 75 | 'section' => 'lsx-layout', |
| 76 | 76 | 'control' => 'LSX_Customize_Header_Layout_Control', |
| 77 | 77 | 'choices' => array( |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | ); |
| 89 | 89 | |
| 90 | 90 | $lsx_controls['fields']['lsx_header_mobile_layout'] = array( |
| 91 | - 'label' => esc_html__( 'Mobile Header', 'lsx' ), |
|
| 91 | + 'label' => esc_html__('Mobile Header', 'lsx'), |
|
| 92 | 92 | 'section' => 'lsx-layout', |
| 93 | 93 | 'control' => 'LSX_Customize_Mobile_Header_Layout_Control', |
| 94 | 94 | 'choices' => array( |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | ); |
| 105 | 105 | |
| 106 | 106 | $lsx_controls['fields']['lsx_layout'] = array( |
| 107 | - 'label' => esc_html__( 'Body', 'lsx' ), |
|
| 107 | + 'label' => esc_html__('Body', 'lsx'), |
|
| 108 | 108 | 'section' => 'lsx-layout', |
| 109 | 109 | 'control' => 'LSX_Customize_Layout_Control', |
| 110 | 110 | 'choices' => array( |
@@ -114,16 +114,16 @@ discard block |
||
| 114 | 114 | ), |
| 115 | 115 | ); |
| 116 | 116 | |
| 117 | - $lsx_controls = apply_filters( 'lsx_layout_customizer_controls', $lsx_controls ); |
|
| 117 | + $lsx_controls = apply_filters('lsx_layout_customizer_controls', $lsx_controls); |
|
| 118 | 118 | |
| 119 | 119 | return $lsx_controls; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | endif; |
| 123 | 123 | |
| 124 | -add_filter( 'lsx_customizer_controls', 'lsx_customizer_layout_controls' ); |
|
| 124 | +add_filter('lsx_customizer_controls', 'lsx_customizer_layout_controls'); |
|
| 125 | 125 | |
| 126 | -if ( ! function_exists( 'lsx_customizer_template_cover_controls' ) ) : |
|
| 126 | +if ( ! function_exists('lsx_customizer_template_cover_controls')) : |
|
| 127 | 127 | |
| 128 | 128 | /** |
| 129 | 129 | * Returns an array of the Cover Template panel. |
@@ -133,10 +133,10 @@ discard block |
||
| 133 | 133 | * |
| 134 | 134 | * @return $lsx_controls array() |
| 135 | 135 | */ |
| 136 | - function lsx_customizer_template_cover_controls( $lsx_controls ) { |
|
| 136 | + function lsx_customizer_template_cover_controls($lsx_controls) { |
|
| 137 | 137 | $lsx_controls['sections']['lsx-cover-template'] = array( |
| 138 | - 'title' => esc_html__( 'Cover Template Settings', 'lsx' ), |
|
| 139 | - 'description' => esc_html__( 'Change the cover template settings.', 'lsx' ), |
|
| 138 | + 'title' => esc_html__('Cover Template Settings', 'lsx'), |
|
| 139 | + 'description' => esc_html__('Change the cover template settings.', 'lsx'), |
|
| 140 | 140 | 'priority' => 23, |
| 141 | 141 | ); |
| 142 | 142 | |
@@ -149,8 +149,8 @@ discard block |
||
| 149 | 149 | ); |
| 150 | 150 | |
| 151 | 151 | $lsx_controls['fields']['lsx_cover_template_alt_logo'] = array( |
| 152 | - 'label' => esc_html__( 'Upload Alternative Logo Image', 'lsx' ), |
|
| 153 | - 'description' => __( 'Upload an alternative logo image (svg, png or jpg).', 'lsx' ), |
|
| 152 | + 'label' => esc_html__('Upload Alternative Logo Image', 'lsx'), |
|
| 153 | + 'description' => __('Upload an alternative logo image (svg, png or jpg).', 'lsx'), |
|
| 154 | 154 | 'section' => 'lsx-cover-template', |
| 155 | 155 | 'control' => 'WP_Customize_Media_Control', |
| 156 | 156 | 'mime_type' => 'image', |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | ); |
| 164 | 164 | |
| 165 | 165 | $lsx_controls['fields']['lsx_cover_template_fixed_background'] = array( |
| 166 | - 'label' => esc_html__( 'Fixed Background Image', 'lsx' ), |
|
| 166 | + 'label' => esc_html__('Fixed Background Image', 'lsx'), |
|
| 167 | 167 | 'section' => 'lsx-cover-template', |
| 168 | 168 | 'type' => 'checkbox', |
| 169 | 169 | ); |
@@ -176,8 +176,8 @@ discard block |
||
| 176 | 176 | ); |
| 177 | 177 | |
| 178 | 178 | $lsx_controls['fields']['lsx_cover_template_cover_background_color'] = array( |
| 179 | - 'label' => esc_html__( 'Cover Background Colour', 'lsx' ), |
|
| 180 | - 'description' => __( 'The colour used for the cover background, for post or pages without featured image. Defaults to #27639e.', 'lsx' ), |
|
| 179 | + 'label' => esc_html__('Cover Background Colour', 'lsx'), |
|
| 180 | + 'description' => __('The colour used for the cover background, for post or pages without featured image. Defaults to #27639e.', 'lsx'), |
|
| 181 | 181 | 'section' => 'lsx-cover-template', |
| 182 | 182 | 'control' => 'WP_Customize_Color_Control', |
| 183 | 183 | ); |
@@ -190,8 +190,8 @@ discard block |
||
| 190 | 190 | ); |
| 191 | 191 | |
| 192 | 192 | $lsx_controls['fields']['lsx_cover_template_overlay_background_color'] = array( |
| 193 | - 'label' => esc_html__( 'Overlay Background Colour', 'lsx' ), |
|
| 194 | - 'description' => __( 'The colour used for the overlay. Defaults to black.', 'lsx' ), |
|
| 193 | + 'label' => esc_html__('Overlay Background Colour', 'lsx'), |
|
| 194 | + 'description' => __('The colour used for the overlay. Defaults to black.', 'lsx'), |
|
| 195 | 195 | 'section' => 'lsx-cover-template', |
| 196 | 196 | 'control' => 'WP_Customize_Color_Control', |
| 197 | 197 | ); |
@@ -205,8 +205,8 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | $lsx_controls['fields']['lsx_cover_template_overlay_text_color'] = ( |
| 207 | 207 | array( |
| 208 | - 'label' => __( 'Overlay Text Colour', 'lsx' ), |
|
| 209 | - 'description' => __( 'The colour used for the text in the overlay.', 'lsx' ), |
|
| 208 | + 'label' => __('Overlay Text Colour', 'lsx'), |
|
| 209 | + 'description' => __('The colour used for the text in the overlay.', 'lsx'), |
|
| 210 | 210 | 'section' => 'lsx-cover-template', |
| 211 | 211 | 'control' => 'WP_Customize_Color_Control', |
| 212 | 212 | ) |
@@ -221,8 +221,8 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | $lsx_controls['fields']['lsx_cover_template_menu_text_color'] = ( |
| 223 | 223 | array( |
| 224 | - 'label' => __( 'Menu Text Colour', 'lsx' ), |
|
| 225 | - 'description' => __( 'The colour used for the text in the nav menu.', 'lsx' ), |
|
| 224 | + 'label' => __('Menu Text Colour', 'lsx'), |
|
| 225 | + 'description' => __('The colour used for the text in the nav menu.', 'lsx'), |
|
| 226 | 226 | 'section' => 'lsx-cover-template', |
| 227 | 227 | 'control' => 'WP_Customize_Color_Control', |
| 228 | 228 | ) |
@@ -236,8 +236,8 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | $lsx_controls['fields']['lsx_cover_template_overlay_opacity'] = ( |
| 238 | 238 | array( |
| 239 | - 'label' => __( 'Overlay Opacity', 'lsx' ), |
|
| 240 | - 'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'lsx' ), |
|
| 239 | + 'label' => __('Overlay Opacity', 'lsx'), |
|
| 240 | + 'description' => __('Make sure that the contrast is high enough so that the text is readable.', 'lsx'), |
|
| 241 | 241 | 'section' => 'lsx-cover-template', |
| 242 | 242 | 'type' => 'range', |
| 243 | 243 | ) |
@@ -248,10 +248,10 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | endif; |
| 250 | 250 | |
| 251 | -add_filter( 'lsx_customizer_controls', 'lsx_customizer_template_cover_controls' ); |
|
| 251 | +add_filter('lsx_customizer_controls', 'lsx_customizer_template_cover_controls'); |
|
| 252 | 252 | |
| 253 | 253 | |
| 254 | -if ( ! function_exists( 'lsx_get_customizer_controls' ) ) : |
|
| 254 | +if ( ! function_exists('lsx_get_customizer_controls')) : |
|
| 255 | 255 | |
| 256 | 256 | /** |
| 257 | 257 | * Returns an array of $controls for the customizer class to generate. |
@@ -263,10 +263,10 @@ discard block |
||
| 263 | 263 | */ |
| 264 | 264 | function lsx_get_customizer_controls() { |
| 265 | 265 | $lsx_controls = array(); |
| 266 | - $lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls ); |
|
| 266 | + $lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls); |
|
| 267 | 267 | return $lsx_controls; |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | endif; |
| 271 | 271 | |
| 272 | -$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() ); |
|
| 272 | +$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls()); |
|