@@ -14,46 +14,46 @@ discard block |
||
14 | 14 | <?php //lsx_entry_top(); ?> |
15 | 15 | |
16 | 16 | <?php |
17 | - // On the cover page template, output the cover header. |
|
18 | - $cover_header_style = ''; |
|
19 | - $cover_header_classes = ''; |
|
20 | - |
|
21 | - $color_overlay_style = ''; |
|
22 | - $color_overlay_classes = ''; |
|
23 | - |
|
24 | - $image_url = ! post_password_required() ? get_the_post_thumbnail_url( get_the_ID(), 'full' ) : ''; |
|
25 | - |
|
26 | - if ( $image_url ) { |
|
27 | - $cover_header_style .= 'background-image: url( ' . esc_url( $image_url ) . ' );'; |
|
28 | - $cover_header_classes = ' bg-image'; |
|
29 | - } |
|
30 | - |
|
31 | - // Get the color used for the color overlay. |
|
32 | - $color_cover_color = get_theme_mod( 'lsx_cover_template_cover_background_color' ); |
|
33 | - if ( $color_cover_color ) { |
|
34 | - $cover_header_style .= ' background-color: ' . esc_attr( $color_cover_color ) . ';'; |
|
35 | - } else { |
|
36 | - $cover_header_style .= ' background-color: #27639e;'; |
|
37 | - } |
|
38 | - |
|
39 | - // Get the color used for the color overlay. |
|
40 | - $color_overlay_color = get_theme_mod( 'lsx_cover_template_overlay_background_color' ); |
|
41 | - if ( $color_overlay_color ) { |
|
42 | - $color_overlay_style = ' style="color: ' . esc_attr( $color_overlay_color ) . ';"'; |
|
43 | - } else { |
|
44 | - $color_overlay_style = ''; |
|
45 | - } |
|
46 | - |
|
47 | - // Get the fixed background attachment option. |
|
48 | - if ( get_theme_mod( 'lsx_cover_template_fixed_background', true ) ) { |
|
49 | - $cover_header_classes .= ' bg-attachment-fixed'; |
|
50 | - } |
|
51 | - |
|
52 | - // Get the opacity of the color overlay. |
|
53 | - $color_overlay_opacity = get_theme_mod( 'lsx_cover_template_overlay_opacity' ); |
|
54 | - $color_overlay_opacity = ( false === $color_overlay_opacity ) ? 80 : $color_overlay_opacity; |
|
55 | - $color_overlay_classes .= ' opacity-' . $color_overlay_opacity; |
|
56 | - ?> |
|
17 | + // On the cover page template, output the cover header. |
|
18 | + $cover_header_style = ''; |
|
19 | + $cover_header_classes = ''; |
|
20 | + |
|
21 | + $color_overlay_style = ''; |
|
22 | + $color_overlay_classes = ''; |
|
23 | + |
|
24 | + $image_url = ! post_password_required() ? get_the_post_thumbnail_url( get_the_ID(), 'full' ) : ''; |
|
25 | + |
|
26 | + if ( $image_url ) { |
|
27 | + $cover_header_style .= 'background-image: url( ' . esc_url( $image_url ) . ' );'; |
|
28 | + $cover_header_classes = ' bg-image'; |
|
29 | + } |
|
30 | + |
|
31 | + // Get the color used for the color overlay. |
|
32 | + $color_cover_color = get_theme_mod( 'lsx_cover_template_cover_background_color' ); |
|
33 | + if ( $color_cover_color ) { |
|
34 | + $cover_header_style .= ' background-color: ' . esc_attr( $color_cover_color ) . ';'; |
|
35 | + } else { |
|
36 | + $cover_header_style .= ' background-color: #27639e;'; |
|
37 | + } |
|
38 | + |
|
39 | + // Get the color used for the color overlay. |
|
40 | + $color_overlay_color = get_theme_mod( 'lsx_cover_template_overlay_background_color' ); |
|
41 | + if ( $color_overlay_color ) { |
|
42 | + $color_overlay_style = ' style="color: ' . esc_attr( $color_overlay_color ) . ';"'; |
|
43 | + } else { |
|
44 | + $color_overlay_style = ''; |
|
45 | + } |
|
46 | + |
|
47 | + // Get the fixed background attachment option. |
|
48 | + if ( get_theme_mod( 'lsx_cover_template_fixed_background', true ) ) { |
|
49 | + $cover_header_classes .= ' bg-attachment-fixed'; |
|
50 | + } |
|
51 | + |
|
52 | + // Get the opacity of the color overlay. |
|
53 | + $color_overlay_opacity = get_theme_mod( 'lsx_cover_template_overlay_opacity' ); |
|
54 | + $color_overlay_opacity = ( false === $color_overlay_opacity ) ? 80 : $color_overlay_opacity; |
|
55 | + $color_overlay_classes .= ' opacity-' . $color_overlay_opacity; |
|
56 | + ?> |
|
57 | 57 | |
58 | 58 | <div class="cover-header <?php echo esc_html( $cover_header_classes ); ?>" style="<?php echo wp_kses_post( $cover_header_style ); ?>"> |
59 | 59 | <div class="cover-header-inner-wrapper"> |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | <?php |
67 | 67 | |
68 | - if ( has_category() ) { |
|
69 | - ?> |
|
68 | + if ( has_category() ) { |
|
69 | + ?> |
|
70 | 70 | |
71 | 71 | <div class="entry-categories"> |
72 | 72 | <div class="entry-categories-inner"> |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | </div> |
76 | 76 | |
77 | 77 | <?php |
78 | - } |
|
78 | + } |
|
79 | 79 | |
80 | - the_title( '<h1 class="entry-title">', '</h1>' ); |
|
80 | + the_title( '<h1 class="entry-title">', '</h1>' ); |
|
81 | 81 | |
82 | - if ( is_page() ) { |
|
83 | - ?> |
|
82 | + if ( is_page() ) { |
|
83 | + ?> |
|
84 | 84 | |
85 | 85 | <div class="to-the-content-wrapper"> |
86 | 86 | |
@@ -91,26 +91,26 @@ discard block |
||
91 | 91 | </div> |
92 | 92 | |
93 | 93 | <?php |
94 | - } else { |
|
94 | + } else { |
|
95 | 95 | |
96 | - if ( has_excerpt() ) { |
|
97 | - ?> |
|
96 | + if ( has_excerpt() ) { |
|
97 | + ?> |
|
98 | 98 | |
99 | 99 | <div class="intro-text section-inner"> |
100 | 100 | <?php the_excerpt(); ?> |
101 | 101 | </div> |
102 | 102 | |
103 | 103 | <?php |
104 | - } |
|
104 | + } |
|
105 | 105 | |
106 | - ?> |
|
106 | + ?> |
|
107 | 107 | <div class="entry-meta"> |
108 | 108 | <?php lsx_post_meta_list_top(); ?> |
109 | 109 | </div><!-- .entry-meta --> |
110 | 110 | <?php |
111 | 111 | |
112 | - } |
|
113 | - ?> |
|
112 | + } |
|
113 | + ?> |
|
114 | 114 | |
115 | 115 | </div> |
116 | 116 | </header> |
@@ -123,15 +123,15 @@ discard block |
||
123 | 123 | <?php lsx_entry_inside_top(); ?> |
124 | 124 | |
125 | 125 | <?php |
126 | - the_content(); |
|
127 | - |
|
128 | - wp_link_pages( array( |
|
129 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
130 | - 'after' => '</div></div>', |
|
131 | - 'link_before' => '<span>', |
|
132 | - 'link_after' => '</span>', |
|
133 | - ) ); |
|
134 | - ?> |
|
126 | + the_content(); |
|
127 | + |
|
128 | + wp_link_pages( array( |
|
129 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
130 | + 'after' => '</div></div>', |
|
131 | + 'link_before' => '<span>', |
|
132 | + 'link_after' => '</span>', |
|
133 | + ) ); |
|
134 | + ?> |
|
135 | 135 | </div><!-- .entry-content --> |
136 | 136 | |
137 | 137 | <footer class="footer-meta clearfix"> |
@@ -140,19 +140,19 @@ discard block |
||
140 | 140 | <?php lsx_content_post_tags(); ?> |
141 | 141 | |
142 | 142 | <?php |
143 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
144 | - lsx_content_sharing(); |
|
145 | - } else { |
|
146 | - if ( function_exists( 'sharing_display' ) ) { |
|
147 | - sharing_display( '', true ); |
|
148 | - } |
|
149 | - |
|
150 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
151 | - $custom_likes = new Jetpack_Likes(); |
|
152 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
153 | - } |
|
154 | - } |
|
155 | - ?> |
|
143 | + if ( class_exists( 'LSX_Sharing' ) ) { |
|
144 | + lsx_content_sharing(); |
|
145 | + } else { |
|
146 | + if ( function_exists( 'sharing_display' ) ) { |
|
147 | + sharing_display( '', true ); |
|
148 | + } |
|
149 | + |
|
150 | + if ( class_exists( 'Jetpack_Likes' ) ) { |
|
151 | + $custom_likes = new Jetpack_Likes(); |
|
152 | + echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
153 | + } |
|
154 | + } |
|
155 | + ?> |
|
156 | 156 | <?php endif ?> |
157 | 157 | </footer><!-- .footer-meta --> |
158 | 158 |
@@ -21,65 +21,65 @@ discard block |
||
21 | 21 | $color_overlay_style = ''; |
22 | 22 | $color_overlay_classes = ''; |
23 | 23 | |
24 | - $image_url = ! post_password_required() ? get_the_post_thumbnail_url( get_the_ID(), 'full' ) : ''; |
|
24 | + $image_url = ! post_password_required() ? get_the_post_thumbnail_url(get_the_ID(), 'full') : ''; |
|
25 | 25 | |
26 | - if ( $image_url ) { |
|
27 | - $cover_header_style .= 'background-image: url( ' . esc_url( $image_url ) . ' );'; |
|
26 | + if ($image_url) { |
|
27 | + $cover_header_style .= 'background-image: url( ' . esc_url($image_url) . ' );'; |
|
28 | 28 | $cover_header_classes = ' bg-image'; |
29 | 29 | } |
30 | 30 | |
31 | 31 | // Get the color used for the color overlay. |
32 | - $color_cover_color = get_theme_mod( 'lsx_cover_template_cover_background_color' ); |
|
33 | - if ( $color_cover_color ) { |
|
34 | - $cover_header_style .= ' background-color: ' . esc_attr( $color_cover_color ) . ';'; |
|
32 | + $color_cover_color = get_theme_mod('lsx_cover_template_cover_background_color'); |
|
33 | + if ($color_cover_color) { |
|
34 | + $cover_header_style .= ' background-color: ' . esc_attr($color_cover_color) . ';'; |
|
35 | 35 | } else { |
36 | 36 | $cover_header_style .= ' background-color: #27639e;'; |
37 | 37 | } |
38 | 38 | |
39 | 39 | // Get the color used for the color overlay. |
40 | - $color_overlay_color = get_theme_mod( 'lsx_cover_template_overlay_background_color' ); |
|
41 | - if ( $color_overlay_color ) { |
|
42 | - $color_overlay_style = ' style="color: ' . esc_attr( $color_overlay_color ) . ';"'; |
|
40 | + $color_overlay_color = get_theme_mod('lsx_cover_template_overlay_background_color'); |
|
41 | + if ($color_overlay_color) { |
|
42 | + $color_overlay_style = ' style="color: ' . esc_attr($color_overlay_color) . ';"'; |
|
43 | 43 | } else { |
44 | 44 | $color_overlay_style = ''; |
45 | 45 | } |
46 | 46 | |
47 | 47 | // Get the fixed background attachment option. |
48 | - if ( get_theme_mod( 'lsx_cover_template_fixed_background', true ) ) { |
|
48 | + if (get_theme_mod('lsx_cover_template_fixed_background', true)) { |
|
49 | 49 | $cover_header_classes .= ' bg-attachment-fixed'; |
50 | 50 | } |
51 | 51 | |
52 | 52 | // Get the opacity of the color overlay. |
53 | - $color_overlay_opacity = get_theme_mod( 'lsx_cover_template_overlay_opacity' ); |
|
54 | - $color_overlay_opacity = ( false === $color_overlay_opacity ) ? 80 : $color_overlay_opacity; |
|
53 | + $color_overlay_opacity = get_theme_mod('lsx_cover_template_overlay_opacity'); |
|
54 | + $color_overlay_opacity = (false === $color_overlay_opacity) ? 80 : $color_overlay_opacity; |
|
55 | 55 | $color_overlay_classes .= ' opacity-' . $color_overlay_opacity; |
56 | 56 | ?> |
57 | 57 | |
58 | - <div class="cover-header <?php echo esc_html( $cover_header_classes ); ?>" style="<?php echo wp_kses_post( $cover_header_style ); ?>"> |
|
58 | + <div class="cover-header <?php echo esc_html($cover_header_classes); ?>" style="<?php echo wp_kses_post($cover_header_style); ?>"> |
|
59 | 59 | <div class="cover-header-inner-wrapper"> |
60 | 60 | <div class="cover-header-inner"> |
61 | - <div class="cover-color-overlay color-accent<?php echo esc_attr( $color_overlay_classes ); ?>"<?php echo wp_kses_post( $color_overlay_style ); ?>></div> |
|
61 | + <div class="cover-color-overlay color-accent<?php echo esc_attr($color_overlay_classes); ?>"<?php echo wp_kses_post($color_overlay_style); ?>></div> |
|
62 | 62 | |
63 | 63 | <header class="entry-header has-text-align-center"> |
64 | 64 | <div class="entry-header-inner section-inner"> |
65 | 65 | |
66 | 66 | <?php |
67 | 67 | |
68 | - if ( has_category() ) { |
|
68 | + if (has_category()) { |
|
69 | 69 | ?> |
70 | 70 | |
71 | 71 | <div class="entry-categories"> |
72 | 72 | <div class="entry-categories-inner"> |
73 | - <?php the_category( ' ' ); ?> |
|
73 | + <?php the_category(' '); ?> |
|
74 | 74 | </div> |
75 | 75 | </div> |
76 | 76 | |
77 | 77 | <?php |
78 | 78 | } |
79 | 79 | |
80 | - the_title( '<h1 class="entry-title">', '</h1>' ); |
|
80 | + the_title('<h1 class="entry-title">', '</h1>'); |
|
81 | 81 | |
82 | - if ( is_page() ) { |
|
82 | + if (is_page()) { |
|
83 | 83 | ?> |
84 | 84 | |
85 | 85 | <div class="to-the-content-wrapper"> |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | <?php |
94 | 94 | } else { |
95 | 95 | |
96 | - if ( has_excerpt() ) { |
|
96 | + if (has_excerpt()) { |
|
97 | 97 | ?> |
98 | 98 | |
99 | 99 | <div class="intro-text section-inner"> |
@@ -125,31 +125,31 @@ discard block |
||
125 | 125 | <?php |
126 | 126 | the_content(); |
127 | 127 | |
128 | - wp_link_pages( array( |
|
128 | + wp_link_pages(array( |
|
129 | 129 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
130 | 130 | 'after' => '</div></div>', |
131 | 131 | 'link_before' => '<span>', |
132 | 132 | 'link_after' => '</span>', |
133 | - ) ); |
|
133 | + )); |
|
134 | 134 | ?> |
135 | 135 | </div><!-- .entry-content --> |
136 | 136 | |
137 | 137 | <footer class="footer-meta clearfix"> |
138 | - <?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
138 | + <?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> |
|
139 | 139 | <div class="post-tags-wrapper"> |
140 | 140 | <?php lsx_content_post_tags(); ?> |
141 | 141 | |
142 | 142 | <?php |
143 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
143 | + if (class_exists('LSX_Sharing')) { |
|
144 | 144 | lsx_content_sharing(); |
145 | 145 | } else { |
146 | - if ( function_exists( 'sharing_display' ) ) { |
|
147 | - sharing_display( '', true ); |
|
146 | + if (function_exists('sharing_display')) { |
|
147 | + sharing_display('', true); |
|
148 | 148 | } |
149 | 149 | |
150 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
150 | + if (class_exists('Jetpack_Likes')) { |
|
151 | 151 | $custom_likes = new Jetpack_Likes(); |
152 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
152 | + echo wp_kses_post($custom_likes->post_likes('')); |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | ?> |
@@ -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()); |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | */ |
8 | 8 | function editor_styles() { |
9 | 9 | |
10 | - // Enqueue shared editor styles. |
|
11 | - add_editor_style( |
|
12 | - '/assets/css/admin/gutenberg-admin.css' |
|
13 | - ); |
|
14 | - add_editor_style( |
|
15 | - '/assets/css/yoast/yoast.css' |
|
16 | - ); |
|
10 | + // Enqueue shared editor styles. |
|
11 | + add_editor_style( |
|
12 | + '/assets/css/admin/gutenberg-admin.css' |
|
13 | + ); |
|
14 | + add_editor_style( |
|
15 | + '/assets/css/yoast/yoast.css' |
|
16 | + ); |
|
17 | 17 | |
18 | 18 | } |
19 | 19 | add_action( 'admin_init', 'editor_styles' ); |
@@ -25,138 +25,138 @@ discard block |
||
25 | 25 | */ |
26 | 26 | |
27 | 27 | if ( ! function_exists( 'theme_support' ) ) : |
28 | - /** |
|
29 | - * Add theme support functions. |
|
30 | - * |
|
31 | - * @return void |
|
32 | - */ |
|
33 | - function theme_support() { |
|
34 | - // Add support for editor styles. |
|
35 | - add_theme_support( 'editor-styles' ); |
|
36 | - // Add support for full and wide align images. |
|
37 | - add_theme_support( 'align-wide' ); |
|
38 | - // Add support for styling blocks. |
|
39 | - add_theme_support( 'wp-block-styles' ); |
|
40 | - // Add support for responsive embedded content. |
|
41 | - add_theme_support( 'responsive-embeds' ); |
|
42 | - // Add support for Custom Line Heights. |
|
43 | - add_theme_support( 'custom-line-height' ); |
|
44 | - // Add support for Custom Units. |
|
45 | - add_theme_support( 'custom-units' ); |
|
46 | - // Add support for experimental link colors. |
|
47 | - add_theme_support( 'experimental-link-color' ); |
|
48 | - // Add custom editor font sizes. |
|
49 | - add_theme_support( |
|
50 | - 'editor-font-sizes', |
|
51 | - array( |
|
52 | - array( |
|
53 | - 'name' => esc_html_x( 'Small', 'font size option label', 'lsx' ), |
|
54 | - 'shortName' => esc_html_x( 'S', 'abbreviation of the font size option label', 'lsx' ), |
|
55 | - 'size' => 13, |
|
56 | - 'slug' => 'small', |
|
57 | - ), |
|
58 | - array( |
|
59 | - 'name' => esc_html_x( 'Normal', 'font size option label', 'lsx' ), |
|
60 | - 'shortName' => esc_html_x( 'N', 'abbreviation of the font size option label', 'lsx' ), |
|
61 | - 'size' => 15, |
|
62 | - 'slug' => 'normal', |
|
63 | - ), |
|
64 | - array( |
|
65 | - 'name' => esc_html_x( 'Medium', 'font size option label', 'lsx' ), |
|
66 | - 'shortName' => esc_html_x( 'M', 'abbreviation of the font size option label', 'lsx' ), |
|
67 | - 'size' => 22, |
|
68 | - 'slug' => 'medium', |
|
69 | - ), |
|
70 | - array( |
|
71 | - 'name' => esc_html_x( 'Large', 'font size option label', 'lsx' ), |
|
72 | - 'shortName' => esc_html_x( 'L', 'abbreviation of the font size option label', 'lsx' ), |
|
73 | - 'size' => 30, |
|
74 | - 'slug' => 'large', |
|
75 | - ), |
|
76 | - array( |
|
77 | - 'name' => esc_html_x( 'Huge', 'font size option label', 'lsx' ), |
|
78 | - 'shortName' => esc_html_x( 'XL', 'abbreviation of the font size option label', 'lsx' ), |
|
79 | - 'size' => 40, |
|
80 | - 'slug' => 'huge', |
|
81 | - ), |
|
82 | - ) |
|
83 | - ); |
|
28 | + /** |
|
29 | + * Add theme support functions. |
|
30 | + * |
|
31 | + * @return void |
|
32 | + */ |
|
33 | + function theme_support() { |
|
34 | + // Add support for editor styles. |
|
35 | + add_theme_support( 'editor-styles' ); |
|
36 | + // Add support for full and wide align images. |
|
37 | + add_theme_support( 'align-wide' ); |
|
38 | + // Add support for styling blocks. |
|
39 | + add_theme_support( 'wp-block-styles' ); |
|
40 | + // Add support for responsive embedded content. |
|
41 | + add_theme_support( 'responsive-embeds' ); |
|
42 | + // Add support for Custom Line Heights. |
|
43 | + add_theme_support( 'custom-line-height' ); |
|
44 | + // Add support for Custom Units. |
|
45 | + add_theme_support( 'custom-units' ); |
|
46 | + // Add support for experimental link colors. |
|
47 | + add_theme_support( 'experimental-link-color' ); |
|
48 | + // Add custom editor font sizes. |
|
49 | + add_theme_support( |
|
50 | + 'editor-font-sizes', |
|
51 | + array( |
|
52 | + array( |
|
53 | + 'name' => esc_html_x( 'Small', 'font size option label', 'lsx' ), |
|
54 | + 'shortName' => esc_html_x( 'S', 'abbreviation of the font size option label', 'lsx' ), |
|
55 | + 'size' => 13, |
|
56 | + 'slug' => 'small', |
|
57 | + ), |
|
58 | + array( |
|
59 | + 'name' => esc_html_x( 'Normal', 'font size option label', 'lsx' ), |
|
60 | + 'shortName' => esc_html_x( 'N', 'abbreviation of the font size option label', 'lsx' ), |
|
61 | + 'size' => 15, |
|
62 | + 'slug' => 'normal', |
|
63 | + ), |
|
64 | + array( |
|
65 | + 'name' => esc_html_x( 'Medium', 'font size option label', 'lsx' ), |
|
66 | + 'shortName' => esc_html_x( 'M', 'abbreviation of the font size option label', 'lsx' ), |
|
67 | + 'size' => 22, |
|
68 | + 'slug' => 'medium', |
|
69 | + ), |
|
70 | + array( |
|
71 | + 'name' => esc_html_x( 'Large', 'font size option label', 'lsx' ), |
|
72 | + 'shortName' => esc_html_x( 'L', 'abbreviation of the font size option label', 'lsx' ), |
|
73 | + 'size' => 30, |
|
74 | + 'slug' => 'large', |
|
75 | + ), |
|
76 | + array( |
|
77 | + 'name' => esc_html_x( 'Huge', 'font size option label', 'lsx' ), |
|
78 | + 'shortName' => esc_html_x( 'XL', 'abbreviation of the font size option label', 'lsx' ), |
|
79 | + 'size' => 40, |
|
80 | + 'slug' => 'huge', |
|
81 | + ), |
|
82 | + ) |
|
83 | + ); |
|
84 | 84 | |
85 | - // Add support for custom color scheme. |
|
86 | - add_theme_support( 'editor-color-palette', array( |
|
87 | - array( |
|
88 | - 'name' => __( 'Strong Blue', 'lsx' ), |
|
89 | - 'slug' => 'strong-blue', |
|
90 | - 'color' => '#27639e', |
|
91 | - ), |
|
92 | - array( |
|
93 | - 'name' => __( 'Lighter Blue', 'lsx' ), |
|
94 | - 'slug' => 'lighter-blue', |
|
95 | - 'color' => '#428bca', |
|
96 | - ), |
|
97 | - array( |
|
98 | - 'name' => __( 'Yellow', 'lsx' ), |
|
99 | - 'slug' => 'light-yellow', |
|
100 | - 'color' => '#f7ae00', |
|
101 | - ), |
|
102 | - array( |
|
103 | - 'name' => __( 'Dark Yellow', 'lsx' ), |
|
104 | - 'slug' => 'dark-yellow', |
|
105 | - 'color' => '#ab7800', |
|
106 | - ), |
|
107 | - array( |
|
108 | - 'name' => __( 'Green', 'lsx' ), |
|
109 | - 'slug' => 'light-green', |
|
110 | - 'color' => '#6BA913', |
|
111 | - ), |
|
112 | - array( |
|
113 | - 'name' => __( 'Dark Green', 'lsx' ), |
|
114 | - 'slug' => 'dark-green', |
|
115 | - 'color' => '#3F640B', |
|
116 | - ), |
|
117 | - array( |
|
118 | - 'name' => __( 'White', 'lsx' ), |
|
119 | - 'slug' => 'white', |
|
120 | - 'color' => '#ffffff', |
|
121 | - ), |
|
122 | - array( |
|
123 | - 'name' => __( 'Black', 'lsx' ), |
|
124 | - 'slug' => 'black', |
|
125 | - 'color' => '#000000', |
|
126 | - ), |
|
127 | - ) ); |
|
85 | + // Add support for custom color scheme. |
|
86 | + add_theme_support( 'editor-color-palette', array( |
|
87 | + array( |
|
88 | + 'name' => __( 'Strong Blue', 'lsx' ), |
|
89 | + 'slug' => 'strong-blue', |
|
90 | + 'color' => '#27639e', |
|
91 | + ), |
|
92 | + array( |
|
93 | + 'name' => __( 'Lighter Blue', 'lsx' ), |
|
94 | + 'slug' => 'lighter-blue', |
|
95 | + 'color' => '#428bca', |
|
96 | + ), |
|
97 | + array( |
|
98 | + 'name' => __( 'Yellow', 'lsx' ), |
|
99 | + 'slug' => 'light-yellow', |
|
100 | + 'color' => '#f7ae00', |
|
101 | + ), |
|
102 | + array( |
|
103 | + 'name' => __( 'Dark Yellow', 'lsx' ), |
|
104 | + 'slug' => 'dark-yellow', |
|
105 | + 'color' => '#ab7800', |
|
106 | + ), |
|
107 | + array( |
|
108 | + 'name' => __( 'Green', 'lsx' ), |
|
109 | + 'slug' => 'light-green', |
|
110 | + 'color' => '#6BA913', |
|
111 | + ), |
|
112 | + array( |
|
113 | + 'name' => __( 'Dark Green', 'lsx' ), |
|
114 | + 'slug' => 'dark-green', |
|
115 | + 'color' => '#3F640B', |
|
116 | + ), |
|
117 | + array( |
|
118 | + 'name' => __( 'White', 'lsx' ), |
|
119 | + 'slug' => 'white', |
|
120 | + 'color' => '#ffffff', |
|
121 | + ), |
|
122 | + array( |
|
123 | + 'name' => __( 'Black', 'lsx' ), |
|
124 | + 'slug' => 'black', |
|
125 | + 'color' => '#000000', |
|
126 | + ), |
|
127 | + ) ); |
|
128 | 128 | |
129 | - $primary_color = 'rgba(39,99,158,1)'; |
|
130 | - $secondary_color = 'rgba(247,174,0,1)'; |
|
131 | - $tertiary_color = 'rgba(107,169,19,1)'; |
|
132 | - $background_color = 'rgba(249,249,249,1)'; |
|
129 | + $primary_color = 'rgba(39,99,158,1)'; |
|
130 | + $secondary_color = 'rgba(247,174,0,1)'; |
|
131 | + $tertiary_color = 'rgba(107,169,19,1)'; |
|
132 | + $background_color = 'rgba(249,249,249,1)'; |
|
133 | 133 | |
134 | - add_theme_support( |
|
135 | - 'editor-gradient-presets', |
|
136 | - array( |
|
137 | - array( |
|
138 | - 'name' => __( 'Primary to Secondary', 'lsx' ), |
|
139 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $secondary_color ) . ' 100%)', |
|
140 | - 'slug' => 'primary-to-secondary', |
|
141 | - ), |
|
142 | - array( |
|
143 | - 'name' => __( 'Primary to Tertiary', 'lsx' ), |
|
144 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
145 | - 'slug' => 'primary-to-tertiary', |
|
146 | - ), |
|
147 | - array( |
|
148 | - 'name' => __( 'Primary to Background', 'lsx' ), |
|
149 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $background_color ) . ' 100%)', |
|
150 | - 'slug' => 'primary-to-background', |
|
151 | - ), |
|
152 | - array( |
|
153 | - 'name' => __( 'Secondary to Tertiary', 'lsx' ), |
|
154 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $secondary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
155 | - 'slug' => 'secondary-to-tertiary', |
|
156 | - ), |
|
157 | - ) |
|
158 | - ); |
|
159 | - } |
|
134 | + add_theme_support( |
|
135 | + 'editor-gradient-presets', |
|
136 | + array( |
|
137 | + array( |
|
138 | + 'name' => __( 'Primary to Secondary', 'lsx' ), |
|
139 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $secondary_color ) . ' 100%)', |
|
140 | + 'slug' => 'primary-to-secondary', |
|
141 | + ), |
|
142 | + array( |
|
143 | + 'name' => __( 'Primary to Tertiary', 'lsx' ), |
|
144 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
145 | + 'slug' => 'primary-to-tertiary', |
|
146 | + ), |
|
147 | + array( |
|
148 | + 'name' => __( 'Primary to Background', 'lsx' ), |
|
149 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $background_color ) . ' 100%)', |
|
150 | + 'slug' => 'primary-to-background', |
|
151 | + ), |
|
152 | + array( |
|
153 | + 'name' => __( 'Secondary to Tertiary', 'lsx' ), |
|
154 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $secondary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
155 | + 'slug' => 'secondary-to-tertiary', |
|
156 | + ), |
|
157 | + ) |
|
158 | + ); |
|
159 | + } |
|
160 | 160 | endif; |
161 | 161 | add_action( 'after_setup_theme', 'theme_support' ); |
162 | 162 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @return void |
168 | 168 | */ |
169 | 169 | function lsx_wpforms_match_button_block( $form_data ) { |
170 | - $form_data['settings']['submit_class'] .= ' btn'; |
|
171 | - return $form_data; |
|
170 | + $form_data['settings']['submit_class'] .= ' btn'; |
|
171 | + return $form_data; |
|
172 | 172 | } |
173 | 173 | add_filter( 'wpforms_frontend_form_data', 'lsx_wpforms_match_button_block' ); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | ); |
17 | 17 | |
18 | 18 | } |
19 | -add_action( 'admin_init', 'editor_styles' ); |
|
19 | +add_action('admin_init', 'editor_styles'); |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Add theme support functions. |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @package lsx |
25 | 25 | */ |
26 | 26 | |
27 | -if ( ! function_exists( 'theme_support' ) ) : |
|
27 | +if ( ! function_exists('theme_support')) : |
|
28 | 28 | /** |
29 | 29 | * Add theme support functions. |
30 | 30 | * |
@@ -32,50 +32,50 @@ discard block |
||
32 | 32 | */ |
33 | 33 | function theme_support() { |
34 | 34 | // Add support for editor styles. |
35 | - add_theme_support( 'editor-styles' ); |
|
35 | + add_theme_support('editor-styles'); |
|
36 | 36 | // Add support for full and wide align images. |
37 | - add_theme_support( 'align-wide' ); |
|
37 | + add_theme_support('align-wide'); |
|
38 | 38 | // Add support for styling blocks. |
39 | - add_theme_support( 'wp-block-styles' ); |
|
39 | + add_theme_support('wp-block-styles'); |
|
40 | 40 | // Add support for responsive embedded content. |
41 | - add_theme_support( 'responsive-embeds' ); |
|
41 | + add_theme_support('responsive-embeds'); |
|
42 | 42 | // Add support for Custom Line Heights. |
43 | - add_theme_support( 'custom-line-height' ); |
|
43 | + add_theme_support('custom-line-height'); |
|
44 | 44 | // Add support for Custom Units. |
45 | - add_theme_support( 'custom-units' ); |
|
45 | + add_theme_support('custom-units'); |
|
46 | 46 | // Add support for experimental link colors. |
47 | - add_theme_support( 'experimental-link-color' ); |
|
47 | + add_theme_support('experimental-link-color'); |
|
48 | 48 | // Add custom editor font sizes. |
49 | 49 | add_theme_support( |
50 | 50 | 'editor-font-sizes', |
51 | 51 | array( |
52 | 52 | array( |
53 | - 'name' => esc_html_x( 'Small', 'font size option label', 'lsx' ), |
|
54 | - 'shortName' => esc_html_x( 'S', 'abbreviation of the font size option label', 'lsx' ), |
|
53 | + 'name' => esc_html_x('Small', 'font size option label', 'lsx'), |
|
54 | + 'shortName' => esc_html_x('S', 'abbreviation of the font size option label', 'lsx'), |
|
55 | 55 | 'size' => 13, |
56 | 56 | 'slug' => 'small', |
57 | 57 | ), |
58 | 58 | array( |
59 | - 'name' => esc_html_x( 'Normal', 'font size option label', 'lsx' ), |
|
60 | - 'shortName' => esc_html_x( 'N', 'abbreviation of the font size option label', 'lsx' ), |
|
59 | + 'name' => esc_html_x('Normal', 'font size option label', 'lsx'), |
|
60 | + 'shortName' => esc_html_x('N', 'abbreviation of the font size option label', 'lsx'), |
|
61 | 61 | 'size' => 15, |
62 | 62 | 'slug' => 'normal', |
63 | 63 | ), |
64 | 64 | array( |
65 | - 'name' => esc_html_x( 'Medium', 'font size option label', 'lsx' ), |
|
66 | - 'shortName' => esc_html_x( 'M', 'abbreviation of the font size option label', 'lsx' ), |
|
65 | + 'name' => esc_html_x('Medium', 'font size option label', 'lsx'), |
|
66 | + 'shortName' => esc_html_x('M', 'abbreviation of the font size option label', 'lsx'), |
|
67 | 67 | 'size' => 22, |
68 | 68 | 'slug' => 'medium', |
69 | 69 | ), |
70 | 70 | array( |
71 | - 'name' => esc_html_x( 'Large', 'font size option label', 'lsx' ), |
|
72 | - 'shortName' => esc_html_x( 'L', 'abbreviation of the font size option label', 'lsx' ), |
|
71 | + 'name' => esc_html_x('Large', 'font size option label', 'lsx'), |
|
72 | + 'shortName' => esc_html_x('L', 'abbreviation of the font size option label', 'lsx'), |
|
73 | 73 | 'size' => 30, |
74 | 74 | 'slug' => 'large', |
75 | 75 | ), |
76 | 76 | array( |
77 | - 'name' => esc_html_x( 'Huge', 'font size option label', 'lsx' ), |
|
78 | - 'shortName' => esc_html_x( 'XL', 'abbreviation of the font size option label', 'lsx' ), |
|
77 | + 'name' => esc_html_x('Huge', 'font size option label', 'lsx'), |
|
78 | + 'shortName' => esc_html_x('XL', 'abbreviation of the font size option label', 'lsx'), |
|
79 | 79 | 'size' => 40, |
80 | 80 | 'slug' => 'huge', |
81 | 81 | ), |
@@ -83,48 +83,48 @@ discard block |
||
83 | 83 | ); |
84 | 84 | |
85 | 85 | // Add support for custom color scheme. |
86 | - add_theme_support( 'editor-color-palette', array( |
|
86 | + add_theme_support('editor-color-palette', array( |
|
87 | 87 | array( |
88 | - 'name' => __( 'Strong Blue', 'lsx' ), |
|
88 | + 'name' => __('Strong Blue', 'lsx'), |
|
89 | 89 | 'slug' => 'strong-blue', |
90 | 90 | 'color' => '#27639e', |
91 | 91 | ), |
92 | 92 | array( |
93 | - 'name' => __( 'Lighter Blue', 'lsx' ), |
|
93 | + 'name' => __('Lighter Blue', 'lsx'), |
|
94 | 94 | 'slug' => 'lighter-blue', |
95 | 95 | 'color' => '#428bca', |
96 | 96 | ), |
97 | 97 | array( |
98 | - 'name' => __( 'Yellow', 'lsx' ), |
|
98 | + 'name' => __('Yellow', 'lsx'), |
|
99 | 99 | 'slug' => 'light-yellow', |
100 | 100 | 'color' => '#f7ae00', |
101 | 101 | ), |
102 | 102 | array( |
103 | - 'name' => __( 'Dark Yellow', 'lsx' ), |
|
103 | + 'name' => __('Dark Yellow', 'lsx'), |
|
104 | 104 | 'slug' => 'dark-yellow', |
105 | 105 | 'color' => '#ab7800', |
106 | 106 | ), |
107 | 107 | array( |
108 | - 'name' => __( 'Green', 'lsx' ), |
|
108 | + 'name' => __('Green', 'lsx'), |
|
109 | 109 | 'slug' => 'light-green', |
110 | 110 | 'color' => '#6BA913', |
111 | 111 | ), |
112 | 112 | array( |
113 | - 'name' => __( 'Dark Green', 'lsx' ), |
|
113 | + 'name' => __('Dark Green', 'lsx'), |
|
114 | 114 | 'slug' => 'dark-green', |
115 | 115 | 'color' => '#3F640B', |
116 | 116 | ), |
117 | 117 | array( |
118 | - 'name' => __( 'White', 'lsx' ), |
|
118 | + 'name' => __('White', 'lsx'), |
|
119 | 119 | 'slug' => 'white', |
120 | 120 | 'color' => '#ffffff', |
121 | 121 | ), |
122 | 122 | array( |
123 | - 'name' => __( 'Black', 'lsx' ), |
|
123 | + 'name' => __('Black', 'lsx'), |
|
124 | 124 | 'slug' => 'black', |
125 | 125 | 'color' => '#000000', |
126 | 126 | ), |
127 | - ) ); |
|
127 | + )); |
|
128 | 128 | |
129 | 129 | $primary_color = 'rgba(39,99,158,1)'; |
130 | 130 | $secondary_color = 'rgba(247,174,0,1)'; |
@@ -135,30 +135,30 @@ discard block |
||
135 | 135 | 'editor-gradient-presets', |
136 | 136 | array( |
137 | 137 | array( |
138 | - 'name' => __( 'Primary to Secondary', 'lsx' ), |
|
139 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $secondary_color ) . ' 100%)', |
|
138 | + 'name' => __('Primary to Secondary', 'lsx'), |
|
139 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($secondary_color) . ' 100%)', |
|
140 | 140 | 'slug' => 'primary-to-secondary', |
141 | 141 | ), |
142 | 142 | array( |
143 | - 'name' => __( 'Primary to Tertiary', 'lsx' ), |
|
144 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
143 | + 'name' => __('Primary to Tertiary', 'lsx'), |
|
144 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($tertiary_color) . ' 100%)', |
|
145 | 145 | 'slug' => 'primary-to-tertiary', |
146 | 146 | ), |
147 | 147 | array( |
148 | - 'name' => __( 'Primary to Background', 'lsx' ), |
|
149 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $background_color ) . ' 100%)', |
|
148 | + 'name' => __('Primary to Background', 'lsx'), |
|
149 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($background_color) . ' 100%)', |
|
150 | 150 | 'slug' => 'primary-to-background', |
151 | 151 | ), |
152 | 152 | array( |
153 | - 'name' => __( 'Secondary to Tertiary', 'lsx' ), |
|
154 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $secondary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
153 | + 'name' => __('Secondary to Tertiary', 'lsx'), |
|
154 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($secondary_color) . ' 0%, ' . esc_attr($tertiary_color) . ' 100%)', |
|
155 | 155 | 'slug' => 'secondary-to-tertiary', |
156 | 156 | ), |
157 | 157 | ) |
158 | 158 | ); |
159 | 159 | } |
160 | 160 | endif; |
161 | -add_action( 'after_setup_theme', 'theme_support' ); |
|
161 | +add_action('after_setup_theme', 'theme_support'); |
|
162 | 162 | |
163 | 163 | /** |
164 | 164 | * WPForms submit button, match Gutenberg button block |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | * @param [type] $form_data |
167 | 167 | * @return void |
168 | 168 | */ |
169 | -function lsx_wpforms_match_button_block( $form_data ) { |
|
169 | +function lsx_wpforms_match_button_block($form_data) { |
|
170 | 170 | $form_data['settings']['submit_class'] .= ' btn'; |
171 | 171 | return $form_data; |
172 | 172 | } |
173 | -add_filter( 'wpforms_frontend_form_data', 'lsx_wpforms_match_button_block' ); |
|
173 | +add_filter('wpforms_frontend_form_data', 'lsx_wpforms_match_button_block'); |