PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.8.14
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.8.14
7.8.14 7.8.14.1 7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / inc / front / non-sshare-styles / form-16--recaptcha.php
wordpress-popup / inc / front / non-sshare-styles Last commit date
form-01--form-container.php 3 years ago form-02--form-fields.php 3 years ago form-03--input.php 5 months ago form-04--select2.php 5 months ago form-05--select2-dropdown.php 3 years ago form-06--timepicker-dropdown.php 3 years ago form-07--radio.php 5 months ago form-08--checkbox.php 5 months ago form-09--calendar.php 3 years ago form-10--submit.php 5 months ago form-11--options-container.php 3 years ago form-12--options-title.php 5 months ago form-13--gdpr.php 5 months ago form-14--error-message.php 5 months ago form-15--success-message.php 2 years ago form-16--recaptcha.php 5 months ago general-01--module-container.php 3 years ago general-02--main-layout.php 1 month ago general-03--layout-header.php 3 years ago general-04--layout-content.php 3 years ago general-05--layout-footer.php 3 years ago general-06--image-size.php 5 months ago general-07--image-fitting.php 3 years ago general-08--image-position.php 5 months ago general-09--content-wrapper.php 3 years ago general-10--title.php 5 months ago general-11--subtitle.php 5 months ago general-12--content.php 5 months ago general-13--cta-container.php 3 years ago general-14--cta-button.php 5 months ago general-15--cta-alignment.php 3 years ago general-16--nsa-link.php 5 months ago general-17--close-button.php 3 years ago general-18--popup-mask.php 3 years ago general-19--cta-helper-text.php 5 months ago module-size-embed.php 5 months ago module-size-popup.php 5 months ago module-size-slidein.php 3 years ago
form-16--recaptcha.php
246 lines
1 <?php
2 /**
3 * Recaptcha custom styles.
4 *
5 * @package Hustle
6 * @since 4.3.0
7 */
8
9 // Check if module has recaptcha and its badge is hidden.
10 if ( ! empty( $form_fields['recaptcha'] ) ) {
11
12 $recaptcha = $form_fields['recaptcha'];
13 $is_badge_hidden = false;
14 if ( 'v2_invisible' === $recaptcha['version'] ) {
15 $is_badge_hidden = '1' !== $recaptcha['v2_invisible_show_badge'];
16 } elseif ( 'v3_recaptcha' === $recaptcha['version'] ) {
17 $is_badge_hidden = '1' !== $recaptcha['v3_recaptcha_show_badge'];
18 }
19
20 if ( $is_badge_hidden ) {
21 // SETTINGS: Margin.
22 $margin_top = ( '' !== $advanced['recaptcha_margin_top'] ) ? $advanced['recaptcha_margin_top'] . $advanced['recaptcha_margin_unit'] : '0';
23 $margin_right = ( '' !== $advanced['recaptcha_margin_right'] ) ? $advanced['recaptcha_margin_right'] . $advanced['recaptcha_margin_unit'] : '0';
24 $margin_bottom = ( '' !== $advanced['recaptcha_margin_bottom'] ) ? $advanced['recaptcha_margin_bottom'] . $advanced['recaptcha_margin_unit'] : '0';
25 $margin_left = ( '' !== $advanced['recaptcha_margin_left'] ) ? $advanced['recaptcha_margin_left'] . $advanced['recaptcha_margin_unit'] : '0';
26
27 $margin = $margin_top . ' ' . $margin_right . ' ' . $margin_bottom . ' ' . $margin_left;
28
29 $mobile_margin_top = ( '' !== $advanced['recaptcha_margin_top_mobile'] ) ? $advanced['recaptcha_margin_top_mobile'] . $advanced['recaptcha_margin_unit_mobile'] : $margin_top;
30 $mobile_margin_right = ( '' !== $advanced['recaptcha_margin_right_mobile'] ) ? $advanced['recaptcha_margin_right_mobile'] . $advanced['recaptcha_margin_unit_mobile'] : $margin_right;
31 $mobile_margin_bottom = ( '' !== $advanced['recaptcha_margin_bottom_mobile'] ) ? $advanced['recaptcha_margin_bottom_mobile'] . $advanced['recaptcha_margin_unit_mobile'] : $margin_bottom;
32 $mobile_margin_left = ( '' !== $advanced['recaptcha_margin_left_mobile'] ) ? $advanced['recaptcha_margin_left_mobile'] . $advanced['recaptcha_margin_unit_mobile'] : $margin_left;
33
34 $mobile_margin = $mobile_margin_top . ' ' . $mobile_margin_right . ' ' . $mobile_margin_bottom . ' ' . $mobile_margin_left;
35 $mobile_margin = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $margin : $mobile_margin;
36
37 // SETTINGS: Padding.
38 $padding_top = ( '' !== $advanced['recaptcha_padding_top'] ) ? $advanced['recaptcha_padding_top'] . $advanced['recaptcha_padding_unit'] : '0';
39 $padding_right = ( '' !== $advanced['recaptcha_padding_right'] ) ? $advanced['recaptcha_padding_right'] . $advanced['recaptcha_padding_unit'] : '0';
40 $padding_bottom = ( '' !== $advanced['recaptcha_padding_bottom'] ) ? $advanced['recaptcha_padding_bottom'] . $advanced['recaptcha_padding_unit'] : '0';
41 $padding_left = ( '' !== $advanced['recaptcha_padding_left'] ) ? $advanced['recaptcha_padding_left'] . $advanced['recaptcha_padding_unit'] : '0';
42
43 $padding = $padding_top . ' ' . $padding_right . ' ' . $padding_bottom . ' ' . $padding_left;
44
45 $mobile_padding_top = ( '' !== $advanced['recaptcha_padding_top_mobile'] ) ? $advanced['recaptcha_padding_top_mobile'] . $advanced['recaptcha_padding_unit_mobile'] : $padding_top;
46 $mobile_padding_right = ( '' !== $advanced['recaptcha_padding_right_mobile'] ) ? $advanced['recaptcha_padding_right_mobile'] . $advanced['recaptcha_padding_unit_mobile'] : $padding_right;
47 $mobile_padding_bottom = ( '' !== $advanced['recaptcha_padding_bottom_mobile'] ) ? $advanced['recaptcha_padding_bottom_mobile'] . $advanced['recaptcha_padding_unit_mobile'] : $padding_bottom;
48 $mobile_padding_left = ( '' !== $advanced['recaptcha_padding_left_mobile'] ) ? $advanced['recaptcha_padding_left_mobile'] . $advanced['recaptcha_padding_unit_mobile'] : $padding_left;
49
50 $mobile_padding = $mobile_padding_top . ' ' . $mobile_padding_right . ' ' . $mobile_padding_bottom . ' ' . $mobile_padding_left;
51 $mobile_padding = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $padding : $mobile_padding;
52
53 // SETTINGS: Border.
54 $border_top = ( '' !== $advanced['recaptcha_border_top'] ) ? $advanced['recaptcha_border_top'] . $advanced['recaptcha_border_unit'] : '0';
55 $border_right = ( '' !== $advanced['recaptcha_border_right'] ) ? $advanced['recaptcha_border_right'] . $advanced['recaptcha_border_unit'] : '0';
56 $border_bottom = ( '' !== $advanced['recaptcha_border_bottom'] ) ? $advanced['recaptcha_border_bottom'] . $advanced['recaptcha_border_unit'] : '0';
57 $border_left = ( '' !== $advanced['recaptcha_border_left'] ) ? $advanced['recaptcha_border_left'] . $advanced['recaptcha_border_unit'] : '0';
58
59 $border_width = $border_top . ' ' . $border_right . ' ' . $border_bottom . ' ' . $border_left;
60 $border_style = $advanced['recaptcha_border_type'];
61 $border_color = $colors['recaptcha_copy_border'];
62
63 $mobile_border_top = ( '' !== $advanced['recaptcha_border_top_mobile'] ) ? $advanced['recaptcha_border_top_mobile'] . $advanced['recaptcha_border_unit_mobile'] : $border_top;
64 $mobile_border_right = ( '' !== $advanced['recaptcha_border_right_mobile'] ) ? $advanced['recaptcha_border_right_mobile'] . $advanced['recaptcha_border_unit_mobile'] : $border_right;
65 $mobile_border_bottom = ( '' !== $advanced['recaptcha_border_bottom_mobile'] ) ? $advanced['recaptcha_border_bottom_mobile'] . $advanced['recaptcha_border_unit_mobile'] : $border_bottom;
66 $mobile_border_left = ( '' !== $advanced['recaptcha_border_left_mobile'] ) ? $advanced['recaptcha_border_left_mobile'] . $advanced['recaptcha_border_unit_mobile'] : $border_left;
67
68 $mobile_border_width = $mobile_border_top . ' ' . $mobile_border_right . ' ' . $mobile_border_bottom . ' ' . $mobile_border_left;
69 $mobile_border_width = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $border_width : $mobile_border_width;
70 $mobile_border_style = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $border_style : $advanced['recaptcha_border_type_mobile'];
71
72 // SETTINGS: Border Radius.
73 $radius_topleft = ( '' !== $advanced['recaptcha_radius_top_left'] ) ? $advanced['recaptcha_radius_top_left'] . $advanced['recaptcha_radius_unit'] : '0';
74 $radius_topright = ( '' !== $advanced['recaptcha_radius_top_right'] ) ? $advanced['recaptcha_radius_top_right'] . $advanced['recaptcha_radius_unit'] : '0';
75 $radius_bottomright = ( '' !== $advanced['recaptcha_radius_bottom_right'] ) ? $advanced['recaptcha_radius_bottom_right'] . $advanced['recaptcha_radius_unit'] : '0';
76 $radius_bottomleft = ( '' !== $advanced['recaptcha_radius_bottom_left'] ) ? $advanced['recaptcha_radius_bottom_left'] . $advanced['recaptcha_radius_unit'] : '0';
77
78 $border_radius = $radius_topleft . ' ' . $radius_topright . ' ' . $radius_bottomright . ' ' . $radius_bottomleft;
79
80 $mobile_radius_topleft = ( '' !== $advanced['recaptcha_radius_top_left_mobile'] ) ? $advanced['recaptcha_radius_top_left_mobile'] . $advanced['recaptcha_radius_unit_mobile'] : $radius_topleft;
81 $mobile_radius_topright = ( '' !== $advanced['recaptcha_radius_top_right_mobile'] ) ? $advanced['recaptcha_radius_top_right_mobile'] . $advanced['recaptcha_radius_unit_mobile'] : $radius_topright;
82 $mobile_radius_bottomright = ( '' !== $advanced['recaptcha_radius_bottom_right_mobile'] ) ? $advanced['recaptcha_radius_bottom_right_mobile'] . $advanced['recaptcha_radius_unit_mobile'] : $radius_bottomright;
83 $mobile_radius_bottomleft = ( '' !== $advanced['recaptcha_radius_bottom_left_mobile'] ) ? $advanced['recaptcha_radius_bottom_left_mobile'] . $advanced['recaptcha_radius_unit_mobile'] : $radius_bottomleft;
84
85 $mobile_border_radius = $mobile_radius_topleft . ' ' . $mobile_radius_topright . ' ' . $mobile_radius_bottomright . ' ' . $mobile_radius_bottomleft;
86 $mobile_border_radius = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $border_radius : $mobile_border_radius;
87
88 // SETTINGS: Box Shadow.
89 $shadow_offset_x = ( '' !== $advanced['recaptcha_drop_shadow_x'] ) ? $advanced['recaptcha_drop_shadow_x'] . $advanced['recaptcha_drop_shadow_unit'] : '0';
90 $shadow_offset_y = ( '' !== $advanced['recaptcha_drop_shadow_y'] ) ? $advanced['recaptcha_drop_shadow_y'] . $advanced['recaptcha_drop_shadow_unit'] : '0';
91 $shadow_blur = ( '' !== $advanced['recaptcha_drop_shadow_blur'] ) ? $advanced['recaptcha_drop_shadow_blur'] . $advanced['recaptcha_drop_shadow_unit'] : '0';
92 $shadow_spread = ( '' !== $advanced['recaptcha_drop_shadow_spread'] ) ? $advanced['recaptcha_drop_shadow_spread'] . $advanced['recaptcha_drop_shadow_unit'] : '0';
93 $shadow_color = $colors['recaptcha_copy_drop_shadow'];
94
95 $box_shadow = $shadow_offset_x . ' ' . $shadow_offset_y . ' ' . $shadow_blur . ' ' . $shadow_spread . ' ' . $shadow_color;
96
97 $mobile_shadow_offset_x = ( '' !== $advanced['recaptcha_drop_shadow_x_mobile'] ) ? $advanced['recaptcha_drop_shadow_x_mobile'] . $advanced['recaptcha_drop_shadow_unit_mobile'] : $shadow_offset_x;
98 $mobile_shadow_offset_y = ( '' !== $advanced['recaptcha_drop_shadow_y_mobile'] ) ? $advanced['recaptcha_drop_shadow_y_mobile'] . $advanced['recaptcha_drop_shadow_unit_mobile'] : $shadow_offset_y;
99 $mobile_shadow_blur = ( '' !== $advanced['recaptcha_drop_shadow_blur_mobile'] ) ? $advanced['recaptcha_drop_shadow_blur_mobile'] . $advanced['recaptcha_drop_shadow_unit_mobile'] : $shadow_blur;
100 $mobile_shadow_spread = ( '' !== $advanced['recaptcha_drop_shadow_spread_mobile'] ) ? $advanced['recaptcha_drop_shadow_spread_mobile'] . $advanced['recaptcha_drop_shadow_unit_mobile'] : $shadow_spread;
101
102 $mobile_box_shadow = $mobile_shadow_offset_x . ' ' . $mobile_shadow_offset_y . ' ' . $mobile_shadow_blur . ' ' . $mobile_shadow_spread . ' ' . $shadow_color;
103 $mobile_box_shadow = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $box_shadow : $mobile_box_shadow;
104
105 // SETTINGS: Colors.
106 $text_color = $colors['recaptcha_copy_text'];
107 $link_default = $colors['recaptcha_copy_link_default'];
108 $link_hover = $colors['recaptcha_copy_link_hover'];
109 $link_focus = $colors['recaptcha_copy_link_focus'];
110
111 // SETTINGS: Font settings.
112 $font_family = $typography['recaptcha_font_family'];
113 $font_size = $typography['recaptcha_font_size'] . $typography['recaptcha_font_size_unit'];
114 $font_weight = $typography['recaptcha_font_weight'];
115 $font_style = 'normal';
116 $alignment = $typography['recaptcha_alignment'];
117 $line_height = $typography['recaptcha_line_height'] . $typography['recaptcha_line_height_unit'];
118 $letter_spacing = $typography['recaptcha_letter_spacing'] . $typography['recaptcha_letter_spacing_unit'];
119 $text_transform = $typography['recaptcha_text_transform'];
120 $text_decoration = $typography['recaptcha_text_decoration'];
121
122 if ( 'custom' === $font_family ) {
123 $font_family = ( '' !== $typography['recaptcha_custom_font_family'] ) ? $typography['recaptcha_custom_font_family'] : 'inherit';
124 }
125
126 if ( 'regular' === $font_weight ) {
127 $font_weight = 'normal';
128 } elseif ( 'italic' === $font_weight ) {
129 $font_weight = 'normal';
130 $font_style = 'italic';
131 } elseif ( preg_match( '/(italic)/', $font_weight ) ) {
132 // Check if font weight is italic.
133 $font_weight = str_replace( 'italic', '', $font_weight );
134 $font_style = 'italic';
135 }
136
137 $mobile_font_size = ( '' !== $typography['recaptcha_font_size_mobile'] ) ? $typography['recaptcha_font_size_mobile'] . $typography['recaptcha_font_size_unit_mobile'] : $font_size;
138 $mobile_font_weight = $typography['recaptcha_font_weight_mobile'];
139 $mobile_font_style = 'normal';
140 $mobile_alignment = $typography['recaptcha_alignment_mobile'];
141 $mobile_line_height = ( '' !== $typography['recaptcha_line_height_mobile'] ) ? $typography['recaptcha_line_height_mobile'] . $typography['recaptcha_line_height_unit_mobile'] : $line_height;
142 $mobile_letter_spacing = ( '' !== $typography['recaptcha_letter_spacing_mobile'] ) ? $typography['recaptcha_letter_spacing_mobile'] . $typography['recaptcha_letter_spacing_unit_mobile'] : $letter_spacing;
143 $mobile_text_transform = $typography['recaptcha_text_transform'];
144 $mobile_text_decoration = $typography['recaptcha_text_decoration_mobile'];
145
146 if ( 'regular' === $mobile_font_weight ) {
147 $mobile_font_weight = 'normal';
148 } elseif ( 'italic' === $font_weight ) {
149 $font_weight = 'normal';
150 $font_style = 'italic';
151 } elseif ( preg_match( '/(italic)/', $mobile_font_weight ) ) {
152 // Check if font weight is italic.
153 $mobile_font_weight = str_replace( 'italic', '', $mobile_font_weight );
154 $mobile_font_style = 'italic';
155 }
156
157 if ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_typography ) ) {
158 $mobile_font_size = $font_size;
159 $mobile_font_weight = $font_weight;
160 $mobile_font_style = $font_style;
161 $mobile_alignment = $alignment;
162 $mobile_line_height = $line_height;
163 $mobile_letter_spacing = $letter_spacing;
164 $mobile_text_transform = $text_transform;
165 $mobile_text_decoration = $text_decoration;
166 }
167
168 $component = '.hustle-layout .hustle-recaptcha-copy';
169
170 $style .= '';
171
172 $style .= $prefix_mobile . $component . ' {';
173 $style .= 'margin: ' . $mobile_margin . ';';
174 $style .= 'padding: ' . $mobile_padding . ';';
175 $style .= 'border-width: ' . $mobile_border_width . ';';
176 $style .= 'border-style: ' . $mobile_border_style . ';';
177 $style .= ( ! $is_vanilla ) ? 'border-color: ' . $border_color . ';' : '';
178 $style .= 'border-radius: ' . $mobile_border_radius . ';';
179 $style .= ( ! $is_vanilla ) ? '-moz-box-shadow: ' . $mobile_box_shadow . ';' : '';
180 $style .= ( ! $is_vanilla ) ? '-webkit-box-shadow: ' . $mobile_box_shadow . ';' : '';
181 $style .= ( ! $is_vanilla ) ? 'box-shadow: ' . $mobile_box_shadow . ';' : '';
182 $style .= ( ! $is_vanilla ) ? 'color: ' . $text_color . ';' : '';
183 $style .= '}';
184
185 $style .= $prefix_mobile . $component . ' p {';
186 $style .= ( ! $is_vanilla ) ? 'color: ' . $text_color . ';' : '';
187 $style .= ( 'inherit' !== $font_family ) ? 'font: ' . $mobile_font_weight . ' ' . $mobile_font_size . '/' . $mobile_line_height . ' ' . $font_family . ';' : '';
188 $style .= ( 'inherit' === $font_family ) ? 'font-size: ' . $mobile_font_size . ';' : '';
189 $style .= ( 'inherit' === $font_family ) ? 'line-height: ' . $mobile_line_height . ';' : '';
190 $style .= ( 'inherit' === $font_family ) ? 'font-weight: ' . $mobile_font_weight . ';' : '';
191 $style .= 'font-style: ' . $mobile_font_style . ';';
192 $style .= 'letter-spacing: ' . $mobile_letter_spacing . ';';
193 $style .= 'text-transform: ' . $mobile_text_transform . ';';
194 $style .= 'text-align: ' . $mobile_alignment . ';';
195 $style .= '}';
196
197 if ( ! $is_vanilla ) {
198
199 $style .= $prefix_mobile . $component . ' a,';
200 $style .= $prefix_mobile . $component . ' a:visited {';
201 $style .= 'color: ' . $link_default . ';';
202 $style .= '}';
203
204 $style .= $prefix_mobile . $component . ' a:hover {';
205 $style .= 'color: ' . $link_hover . ';';
206 $style .= '}';
207
208 $style .= $prefix_mobile . $component . ' a:focus,';
209 $style .= $prefix_mobile . $component . ' a:active {';
210 $style .= 'color: ' . $link_focus . ';';
211 $style .= '}';
212
213 }
214
215 // Desktop styles.
216 if ( $is_mobile_enabled ) {
217
218 $style .= $breakpoint . ' {';
219 $style .= $prefix_desktop . $component . ' {';
220 $style .= 'margin: ' . $margin . ';';
221 $style .= 'padding: ' . $padding . ';';
222 $style .= 'border-width: ' . $border_width . ';';
223 $style .= 'border-style: ' . $border_style . ';';
224 $style .= 'border-radius: ' . $border_radius . ';';
225 $style .= ( ! $is_vanilla ) ? 'box-shadow: ' . $box_shadow . ';' : '';
226 $style .= ( ! $is_vanilla ) ? '-moz-box-shadow: ' . $box_shadow . ';' : '';
227 $style .= ( ! $is_vanilla ) ? '-webkit-box-shadow: ' . $box_shadow . ';' : '';
228 $style .= '}';
229 $style .= '}';
230
231 $style .= $breakpoint . ' {';
232 $style .= $prefix_desktop . $component . ' p {';
233 $style .= ( 'inherit' !== $font_family ) ? 'font: ' . $font_weight . ' ' . $font_size . '/' . $line_height . ' ' . $font_family . ';' : '';
234 $style .= ( 'inherit' === $font_family ) ? 'font-size: ' . $font_size . ';' : '';
235 $style .= ( 'inherit' === $font_family ) ? 'line-height: ' . $line_height . ';' : '';
236 $style .= ( 'inherit' === $font_family ) ? 'font-weight: ' . $font_weight . ';' : '';
237 $style .= 'font-style: ' . $font_style . ';';
238 $style .= 'letter-spacing: ' . $letter_spacing . ';';
239 $style .= 'text-transform: ' . $text_transform . ';';
240 $style .= 'text-align: ' . $alignment . ';';
241 $style .= '}';
242 $style .= '}';
243 }
244 }
245 }
246