@@ -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,48 +32,48 @@ 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 custom editor font sizes. |
47 | 47 | add_theme_support( |
48 | 48 | 'editor-font-sizes', |
49 | 49 | array( |
50 | 50 | array( |
51 | - 'name' => esc_html_x( 'Small', 'font size option label', 'lsx' ), |
|
52 | - 'shortName' => esc_html_x( 'S', 'abbreviation of the font size option label', 'lsx' ), |
|
51 | + 'name' => esc_html_x('Small', 'font size option label', 'lsx'), |
|
52 | + 'shortName' => esc_html_x('S', 'abbreviation of the font size option label', 'lsx'), |
|
53 | 53 | 'size' => 13, |
54 | 54 | 'slug' => 'small', |
55 | 55 | ), |
56 | 56 | array( |
57 | - 'name' => esc_html_x( 'Normal', 'font size option label', 'lsx' ), |
|
58 | - 'shortName' => esc_html_x( 'N', 'abbreviation of the font size option label', 'lsx' ), |
|
57 | + 'name' => esc_html_x('Normal', 'font size option label', 'lsx'), |
|
58 | + 'shortName' => esc_html_x('N', 'abbreviation of the font size option label', 'lsx'), |
|
59 | 59 | 'size' => 15, |
60 | 60 | 'slug' => 'normal', |
61 | 61 | ), |
62 | 62 | array( |
63 | - 'name' => esc_html_x( 'Medium', 'font size option label', 'lsx' ), |
|
64 | - 'shortName' => esc_html_x( 'M', 'abbreviation of the font size option label', 'lsx' ), |
|
63 | + 'name' => esc_html_x('Medium', 'font size option label', 'lsx'), |
|
64 | + 'shortName' => esc_html_x('M', 'abbreviation of the font size option label', 'lsx'), |
|
65 | 65 | 'size' => 22, |
66 | 66 | 'slug' => 'medium', |
67 | 67 | ), |
68 | 68 | array( |
69 | - 'name' => esc_html_x( 'Large', 'font size option label', 'lsx' ), |
|
70 | - 'shortName' => esc_html_x( 'L', 'abbreviation of the font size option label', 'lsx' ), |
|
69 | + 'name' => esc_html_x('Large', 'font size option label', 'lsx'), |
|
70 | + 'shortName' => esc_html_x('L', 'abbreviation of the font size option label', 'lsx'), |
|
71 | 71 | 'size' => 30, |
72 | 72 | 'slug' => 'large', |
73 | 73 | ), |
74 | 74 | array( |
75 | - 'name' => esc_html_x( 'Huge', 'font size option label', 'lsx' ), |
|
76 | - 'shortName' => esc_html_x( 'XL', 'abbreviation of the font size option label', 'lsx' ), |
|
75 | + 'name' => esc_html_x('Huge', 'font size option label', 'lsx'), |
|
76 | + 'shortName' => esc_html_x('XL', 'abbreviation of the font size option label', 'lsx'), |
|
77 | 77 | 'size' => 40, |
78 | 78 | 'slug' => 'huge', |
79 | 79 | ), |
@@ -81,48 +81,48 @@ discard block |
||
81 | 81 | ); |
82 | 82 | |
83 | 83 | // Add support for custom color scheme. |
84 | - add_theme_support( 'editor-color-palette', array( |
|
84 | + add_theme_support('editor-color-palette', array( |
|
85 | 85 | array( |
86 | - 'name' => __( 'Strong Blue', 'lsx' ), |
|
86 | + 'name' => __('Strong Blue', 'lsx'), |
|
87 | 87 | 'slug' => 'strong-blue', |
88 | 88 | 'color' => '#27639e', |
89 | 89 | ), |
90 | 90 | array( |
91 | - 'name' => __( 'Lighter Blue', 'lsx' ), |
|
91 | + 'name' => __('Lighter Blue', 'lsx'), |
|
92 | 92 | 'slug' => 'lighter-blue', |
93 | 93 | 'color' => '#428bca', |
94 | 94 | ), |
95 | 95 | array( |
96 | - 'name' => __( 'Yellow', 'lsx' ), |
|
96 | + 'name' => __('Yellow', 'lsx'), |
|
97 | 97 | 'slug' => 'light-yellow', |
98 | 98 | 'color' => '#f7ae00', |
99 | 99 | ), |
100 | 100 | array( |
101 | - 'name' => __( 'Dark Yellow', 'lsx' ), |
|
101 | + 'name' => __('Dark Yellow', 'lsx'), |
|
102 | 102 | 'slug' => 'dark-yellow', |
103 | 103 | 'color' => '#ab7800', |
104 | 104 | ), |
105 | 105 | array( |
106 | - 'name' => __( 'Green', 'lsx' ), |
|
106 | + 'name' => __('Green', 'lsx'), |
|
107 | 107 | 'slug' => 'light-green', |
108 | 108 | 'color' => '#6BA913', |
109 | 109 | ), |
110 | 110 | array( |
111 | - 'name' => __( 'Dark Green', 'lsx' ), |
|
111 | + 'name' => __('Dark Green', 'lsx'), |
|
112 | 112 | 'slug' => 'dark-green', |
113 | 113 | 'color' => '#3F640B', |
114 | 114 | ), |
115 | 115 | array( |
116 | - 'name' => __( 'White', 'lsx' ), |
|
116 | + 'name' => __('White', 'lsx'), |
|
117 | 117 | 'slug' => 'white', |
118 | 118 | 'color' => '#ffffff', |
119 | 119 | ), |
120 | 120 | array( |
121 | - 'name' => __( 'Black', 'lsx' ), |
|
121 | + 'name' => __('Black', 'lsx'), |
|
122 | 122 | 'slug' => 'black', |
123 | 123 | 'color' => '#000000', |
124 | 124 | ), |
125 | - ) ); |
|
125 | + )); |
|
126 | 126 | |
127 | 127 | $primary_color = 'rgba(39,99,158,1)'; |
128 | 128 | $secondary_color = 'rgba(247,174,0,1)'; |
@@ -133,30 +133,30 @@ discard block |
||
133 | 133 | 'editor-gradient-presets', |
134 | 134 | array( |
135 | 135 | array( |
136 | - 'name' => __( 'Primary to Secondary', 'lsx' ), |
|
137 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $secondary_color ) . ' 100%)', |
|
136 | + 'name' => __('Primary to Secondary', 'lsx'), |
|
137 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($secondary_color) . ' 100%)', |
|
138 | 138 | 'slug' => 'primary-to-secondary', |
139 | 139 | ), |
140 | 140 | array( |
141 | - 'name' => __( 'Primary to Tertiary', 'lsx' ), |
|
142 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
141 | + 'name' => __('Primary to Tertiary', 'lsx'), |
|
142 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($tertiary_color) . ' 100%)', |
|
143 | 143 | 'slug' => 'primary-to-tertiary', |
144 | 144 | ), |
145 | 145 | array( |
146 | - 'name' => __( 'Primary to Background', 'lsx' ), |
|
147 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $background_color ) . ' 100%)', |
|
146 | + 'name' => __('Primary to Background', 'lsx'), |
|
147 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($background_color) . ' 100%)', |
|
148 | 148 | 'slug' => 'primary-to-background', |
149 | 149 | ), |
150 | 150 | array( |
151 | - 'name' => __( 'Secondary to Tertiary', 'lsx' ), |
|
152 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $secondary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
151 | + 'name' => __('Secondary to Tertiary', 'lsx'), |
|
152 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($secondary_color) . ' 0%, ' . esc_attr($tertiary_color) . ' 100%)', |
|
153 | 153 | 'slug' => 'secondary-to-tertiary', |
154 | 154 | ), |
155 | 155 | ) |
156 | 156 | ); |
157 | 157 | } |
158 | 158 | endif; |
159 | -add_action( 'after_setup_theme', 'theme_support' ); |
|
159 | +add_action('after_setup_theme', 'theme_support'); |
|
160 | 160 | |
161 | 161 | /** |
162 | 162 | * WPForms submit button, match Gutenberg button block |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | * @param [type] $form_data |
165 | 165 | * @return void |
166 | 166 | */ |
167 | -function lsx_wpforms_match_button_block( $form_data ) { |
|
167 | +function lsx_wpforms_match_button_block($form_data) { |
|
168 | 168 | $form_data['settings']['submit_class'] .= ' btn'; |
169 | 169 | return $form_data; |
170 | 170 | } |
171 | -add_filter( 'wpforms_frontend_form_data', 'lsx_wpforms_match_button_block' ); |
|
171 | +add_filter('wpforms_frontend_form_data', 'lsx_wpforms_match_button_block'); |