PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.8.9
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.8.9
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-13--gdpr.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 3 years ago form-04--select2.php 3 years ago form-05--select2-dropdown.php 3 years ago form-06--timepicker-dropdown.php 3 years ago form-07--radio.php 3 years ago form-08--checkbox.php 3 years ago form-09--calendar.php 3 years ago form-10--submit.php 3 years ago form-11--options-container.php 3 years ago form-12--options-title.php 3 years ago form-13--gdpr.php 3 years ago form-14--error-message.php 3 years ago form-15--success-message.php 2 years ago form-16--recaptcha.php 3 years ago general-01--module-container.php 3 years ago general-02--main-layout.php 3 years 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 3 years ago general-07--image-fitting.php 3 years ago general-08--image-position.php 3 years ago general-09--content-wrapper.php 3 years ago general-10--title.php 3 years ago general-11--subtitle.php 3 years ago general-12--content.php 9 months ago general-13--cta-container.php 3 years ago general-14--cta-button.php 3 years ago general-15--cta-alignment.php 3 years ago general-16--nsa-link.php 3 years ago general-17--close-button.php 3 years ago general-18--popup-mask.php 3 years ago general-19--cta-helper-text.php 3 years ago module-size-embed.php 3 years ago module-size-popup.php 3 years ago module-size-slidein.php 3 years ago
form-13--gdpr.php
233 lines
1 <?php
2 /**
3 * GDPR Checkbox custom settings.
4 *
5 * @package Hustle
6 * @since 4.3.0
7 */
8
9 $component = '.hustle-layout-form .hustle-checkbox.hustle-gdpr';
10
11 // SETTINGS: Margin.
12 $margin_top = ( '' !== $advanced['gdpr_margin_top'] ) ? $advanced['gdpr_margin_top'] . $advanced['gdpr_margin_unit'] : '0';
13 $margin_right = ( '' !== $advanced['gdpr_margin_right'] ) ? $advanced['gdpr_margin_right'] . $advanced['gdpr_margin_unit'] : '0';
14 $margin_bottom = ( '' !== $advanced['gdpr_margin_bottom'] ) ? $advanced['gdpr_margin_bottom'] . $advanced['gdpr_margin_unit'] : '0';
15 $margin_left = ( '' !== $advanced['gdpr_margin_left'] ) ? $advanced['gdpr_margin_left'] . $advanced['gdpr_margin_unit'] : '0';
16
17 $margin = $margin_top . ' ' . $margin_right . ' ' . $margin_bottom . ' ' . $margin_left;
18
19 $mobile_margin_top = ( '' !== $advanced['gdpr_margin_top_mobile'] ) ? $advanced['gdpr_margin_top_mobile'] . $advanced['gdpr_margin_unit_mobile'] : $margin_top;
20 $mobile_margin_right = ( '' !== $advanced['gdpr_margin_right_mobile'] ) ? $advanced['gdpr_margin_right_mobile'] . $advanced['gdpr_margin_unit_mobile'] : $margin_right;
21 $mobile_margin_bottom = ( '' !== $advanced['gdpr_margin_bottom_mobile'] ) ? $advanced['gdpr_margin_bottom_mobile'] . $advanced['gdpr_margin_unit_mobile'] : $margin_bottom;
22 $mobile_margin_left = ( '' !== $advanced['gdpr_margin_left_mobile'] ) ? $advanced['gdpr_margin_left_mobile'] . $advanced['gdpr_margin_unit_mobile'] : $margin_left;
23
24 $mobile_margin = $mobile_margin_top . ' ' . $mobile_margin_right . ' ' . $mobile_margin_bottom . ' ' . $mobile_margin_left;
25 $mobile_margin = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $margin : $mobile_margin;
26
27 // SETTINGS: Border.
28 $border_top = ( '' !== $advanced['gdpr_border_top'] ) ? $advanced['gdpr_border_top'] . $advanced['gdpr_border_unit'] : '0';
29 $border_right = ( '' !== $advanced['gdpr_border_right'] ) ? $advanced['gdpr_border_right'] . $advanced['gdpr_border_unit'] : '0';
30 $border_bottom = ( '' !== $advanced['gdpr_border_bottom'] ) ? $advanced['gdpr_border_bottom'] . $advanced['gdpr_border_unit'] : '0';
31 $border_left = ( '' !== $advanced['gdpr_border_left'] ) ? $advanced['gdpr_border_left'] . $advanced['gdpr_border_unit'] : '0';
32
33 $border_width = $border_top . ' ' . $border_right . ' ' . $border_bottom . ' ' . $border_left;
34 $border_style = $advanced['gdpr_border_type'];
35
36 $border_color_default = $colors['gdpr_chechbox_border_static'];
37 $border_color_checked = $colors['gdpr_chechbox_border_active'];
38 $border_color_error = $colors['gdpr_checkbox_border_error'];
39
40 $mobile_border_top = ( '' !== $advanced['gdpr_border_top_mobile'] ) ? $advanced['gdpr_border_top_mobile'] . $advanced['gdpr_border_unit_mobile'] : $border_top;
41 $mobile_border_right = ( '' !== $advanced['gdpr_border_right_mobile'] ) ? $advanced['gdpr_border_right_mobile'] . $advanced['gdpr_border_unit_mobile'] : $border_right;
42 $mobile_border_bottom = ( '' !== $advanced['gdpr_border_bottom_mobile'] ) ? $advanced['gdpr_border_bottom_mobile'] . $advanced['gdpr_border_unit_mobile'] : $border_bottom;
43 $mobile_border_left = ( '' !== $advanced['gdpr_border_left_mobile'] ) ? $advanced['gdpr_border_left_mobile'] . $advanced['gdpr_border_unit_mobile'] : $border_left;
44
45 $mobile_border_width = $mobile_border_top . ' ' . $mobile_border_right . ' ' . $mobile_border_bottom . ' ' . $mobile_border_left;
46 $mobile_border_width = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $border_width : $mobile_border_width;
47
48 $mobile_border_style = ( $is_mobile_enabled ) ? $advanced['gdpr_border_type_mobile'] : $border_style;
49 $mobile_border_style = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $border_style : $mobile_border_style;
50
51 // SETTINGS: Border Radius.
52 $radius_topleft = ( '' !== $advanced['gdpr_radius_top_left'] ) ? $advanced['gdpr_radius_top_left'] . $advanced['gdpr_radius_unit'] : '0';
53 $radius_topright = ( '' !== $advanced['gdpr_radius_top_right'] ) ? $advanced['gdpr_radius_top_right'] . $advanced['gdpr_radius_unit'] : '0';
54 $radius_bottomright = ( '' !== $advanced['gdpr_radius_bottom_right'] ) ? $advanced['gdpr_radius_bottom_right'] . $advanced['gdpr_radius_unit'] : '0';
55 $radius_bottomleft = ( '' !== $advanced['gdpr_radius_bottom_left'] ) ? $advanced['gdpr_radius_bottom_left'] . $advanced['gdpr_radius_unit'] : '0';
56
57 $border_radius = $radius_topleft . ' ' . $radius_topright . ' ' . $radius_bottomright . ' ' . $radius_bottomleft;
58
59 $mobile_radius_topleft = ( '' !== $advanced['gdpr_radius_top_left_mobile'] ) ? $advanced['gdpr_radius_top_left_mobile'] . $advanced['gdpr_radius_unit_mobile'] : $radius_topleft;
60 $mobile_radius_topright = ( '' !== $advanced['gdpr_radius_top_right_mobile'] ) ? $advanced['gdpr_radius_top_right_mobile'] . $advanced['gdpr_radius_unit_mobile'] : $radius_topright;
61 $mobile_radius_bottomright = ( '' !== $advanced['gdpr_radius_bottom_right_mobile'] ) ? $advanced['gdpr_radius_bottom_right_mobile'] . $advanced['gdpr_radius_unit_mobile'] : $radius_bottomright;
62 $mobile_radius_bottomleft = ( '' !== $advanced['gdpr_radius_bottom_left_mobile'] ) ? $advanced['gdpr_radius_bottom_left_mobile'] . $advanced['gdpr_radius_unit_mobile'] : $radius_bottomleft;
63
64 $mobile_border_radius = $mobile_radius_topleft . ' ' . $mobile_radius_topright . ' ' . $mobile_radius_bottomright . ' ' . $mobile_radius_bottomleft;
65 $mobile_border_radius = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $border_radius : $mobile_border_radius;
66
67 // SETTINGS: Background.
68 $background_color_default = $colors['gdpr_chechbox_background_static'];
69 $background_color_checked = $colors['gdpr_checkbox_background_active'];
70 $background_color_error = $colors['gdpr_checkbox_background_error'];
71
72 // SETTINGS: Icon.
73 $icon = $colors['gdpr_checkbox_icon'];
74
75 // SETTINGS: Font settings.
76 $color = $colors['gdpr_content'];
77 $font_family = $typography['gdpr_font_family'];
78 $font_size = $typography['gdpr_font_size'] . $typography['gdpr_font_size_unit'];
79 $font_weight = $typography['gdpr_font_weight'];
80 $font_style = 'normal';
81 $alignment = $typography['gdpr_alignment'];
82 $line_height = $typography['gdpr_line_height'] . $typography['gdpr_line_height_unit'];
83 $letter_spacing = $typography['gdpr_letter_spacing'] . $typography['gdpr_letter_spacing_unit'];
84 $text_transform = $typography['gdpr_text_transform'];
85 $text_decoration = $typography['gdpr_text_decoration'];
86
87 if ( 'custom' === $font_family ) {
88 $font_family = ( '' !== $typography['gdpr_custom_font_family'] ) ? $typography['gdpr_custom_font_family'] : 'inherit';
89 }
90
91 if ( 'regular' === $font_weight ) {
92 $font_weight = 'normal';
93 } elseif ( 'italic' === $font_weight ) {
94 $font_weight = 'normal';
95 $font_style = 'italic';
96 } else {
97
98 // Check if font weight is italic.
99 if ( preg_match( '/(italic)/', $font_weight ) ) {
100 $font_weight = str_replace( 'italic', '', $font_weight );
101 $font_style = 'italic';
102 }
103 }
104
105 $mobile_font_size = ( '' !== $typography['gdpr_font_size_mobile'] ) ? $typography['gdpr_font_size_mobile'] . $typography['gdpr_font_size_unit_mobile'] : $font_size;
106 $mobile_font_weight = $typography['gdpr_font_weight_mobile'];
107 $mobile_font_style = 'normal';
108 $mobile_alignment = $typography['gdpr_alignment_mobile'];
109 $mobile_line_height = ( '' !== $typography['gdpr_line_height_mobile'] ) ? $typography['gdpr_line_height_mobile'] . $typography['gdpr_line_height_unit_mobile'] : $line_height;
110 $mobile_letter_spacing = ( '' !== $typography['gdpr_letter_spacing_mobile'] ) ? $typography['gdpr_letter_spacing_mobile'] . $typography['gdpr_letter_spacing_unit_mobile'] : $letter_spacing;
111 $mobile_text_transform = $typography['gdpr_text_transform'];
112 $mobile_text_decoration = $typography['gdpr_text_decoration_mobile'];
113
114 if ( 'regular' === $mobile_font_weight ) {
115 $mobile_font_weight = 'normal';
116 } elseif ( 'italic' === $font_weight ) {
117 $font_weight = 'normal';
118 $font_style = 'italic';
119 } else {
120
121 // Check if font weight is italic.
122 if ( preg_match( '/(italic)/', $mobile_font_weight ) ) {
123 $mobile_font_weight = str_replace( 'italic', '', $mobile_font_weight );
124 $mobile_font_style = 'italic';
125 }
126 }
127
128 if ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_typography ) ) {
129 $mobile_font_size = $font_size;
130 $mobile_font_weight = $font_weight;
131 $mobile_font_style = $font_style;
132 $mobile_alignment = $alignment;
133 $mobile_line_height = $line_height;
134 $mobile_letter_spacing = $letter_spacing;
135 $mobile_text_transform = $text_transform;
136 $mobile_text_decoration = $text_decoration;
137 }
138
139 // SETTINGS: Link colors.
140 $link_default = $colors['gdpr_content_link'];
141 $link_hover = $colors['gdpr_content_link'];
142 $link_focus = $colors['gdpr_content_link'];
143
144 // ==================================================
145 // Check if is an opt-in module.
146 if ( $is_optin ) {
147
148 $style .= ' ';
149
150 // Mobile styles.
151 $style .= $prefix_mobile . $component . ' {';
152 $style .= 'margin: ' . $mobile_margin . ';';
153 $style .= '}';
154
155 $style .= $prefix_mobile . $component . ' span[aria-hidden] {';
156 $style .= 'border-width: ' . $mobile_border_width . ';';
157 $style .= 'border-style: ' . $mobile_border_style . ';';
158 $style .= ( ! $is_vanilla ) ? 'border-color: ' . $border_color_default . ';' : '';
159 $style .= 'border-radius: ' . $mobile_border_radius . ';';
160 $style .= ( ! $is_vanilla ) ? 'background-color: ' . $background_color_default . ';' : '';
161 $style .= '}';
162
163 if ( ! $is_vanilla ) {
164
165 $style .= $prefix_mobile . $component . ' span[aria-hidden]:before {';
166 $style .= 'color: ' . $icon . ';';
167 $style .= '}';
168
169 }
170
171 $style .= $prefix_mobile . $component . ' span:not([aria-hidden]) {';
172 $style .= ( ! $is_vanilla ) ? 'color: ' . $color . ';' : '';
173 $style .= ( 'inherit' !== $font_family ) ? 'font: ' . $mobile_font_weight . ' ' . $mobile_font_size . '/' . $mobile_line_height . ' ' . $font_family . ';' : '';
174 $style .= ( 'inherit' === $font_family ) ? 'font-size: ' . $mobile_font_size . ';' : '';
175 $style .= ( 'inherit' === $font_family ) ? 'line-height: ' . $mobile_line_height . ';' : '';
176 $style .= ( 'inherit' === $font_family ) ? 'font-weight: ' . $mobile_font_weight . ';' : '';
177 $style .= 'font-style: ' . $mobile_font_style . ';';
178 $style .= 'letter-spacing: ' . $mobile_letter_spacing . ';';
179 $style .= 'text-transform: ' . $mobile_text_transform . ';';
180 $style .= 'text-decoration: ' . $mobile_text_decoration . ';';
181 $style .= 'text-align: ' . $mobile_alignment . ';';
182 $style .= '}';
183
184 if ( ! $is_vanilla ) {
185
186 $style .= $prefix_mobile . $component . ' span:not([aria-hidden]) a {';
187 $style .= 'color: ' . $link_default . ';';
188 $style .= '}';
189
190 $style .= $prefix_mobile . $component . ' span:not([aria-hidden]) a:hover {';
191 $style .= 'color: ' . $link_hover . ';';
192 $style .= '}';
193
194 $style .= $prefix_mobile . $component . ' span:not([aria-hidden]) a:focus {';
195 $style .= 'color: ' . $link_focus . ';';
196 $style .= '}';
197
198 $style .= $prefix_mobile . $component . ' input:checked + span[aria-hidden] {';
199 $style .= 'border-color: ' . $border_color_checked . ';';
200 $style .= 'background-color: ' . $background_color_checked . ';';
201 $style .= '}';
202
203 $style .= $prefix_mobile . $component . '.hustle-field-error + span[aria-hidden] {';
204 $style .= 'border-color: ' . $border_color_error . ' !important;';
205 $style .= 'background-color: ' . $background_color_error . ' !important;';
206 $style .= '}';
207
208 }
209
210 // Desktop styles.
211 $style .= $breakpoint . ' {';
212 $style .= $prefix_desktop . $component . ' {';
213 $style .= 'margin: ' . $margin . ';';
214 $style .= '}';
215 $style .= $prefix_desktop . $component . ' span[aria-hidden] {';
216 $style .= 'border-width: ' . $border_width . ';';
217 $style .= 'border-style: ' . $border_style . ';';
218 $style .= 'border-radius: ' . $border_radius . ';';
219 $style .= '}';
220 $style .= $prefix_desktop . $component . ' span:not([aria-hidden]) {';
221 $style .= ( 'inherit' !== $font_family ) ? 'font: ' . $font_weight . ' ' . $font_size . '/' . $line_height . ' ' . $font_family . ';' : '';
222 $style .= ( 'inherit' === $font_family ) ? 'font-size: ' . $font_size . ';' : '';
223 $style .= ( 'inherit' === $font_family ) ? 'line-height: ' . $line_height . ';' : '';
224 $style .= ( 'inherit' === $font_family ) ? 'font-weight: ' . $font_weight . ';' : '';
225 $style .= 'font-style: ' . $font_style . ';';
226 $style .= 'letter-spacing: ' . $letter_spacing . ';';
227 $style .= 'text-transform: ' . $text_transform . ';';
228 $style .= 'text-decoration: ' . $text_decoration . ';';
229 $style .= 'text-align: ' . $alignment . ';';
230 $style .= '}';
231 $style .= '}';
232 }
233