PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / trunk
Hustle – Email Marketing, Lead Generation, Optins, Popups vtrunk
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-08--checkbox.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-08--checkbox.php
175 lines
1 <?php
2 /**
3 * Checkbox custom settings.
4 *
5 * @package Hustle
6 * @since 4.3.0
7 */
8
9 global $wp_locale;
10
11 $is_rtl = $wp_locale->is_rtl();
12
13 $component = '.hustle-form .hustle-checkbox:not(.hustle-gdpr)';
14
15 // SETTINGS: Border.
16 $border_top = ( '' !== $advanced['checkbox_border_top'] ) ? $advanced['checkbox_border_top'] . $advanced['checkbox_border_unit'] : '0';
17 $border_right = ( '' !== $advanced['checkbox_border_right'] ) ? $advanced['checkbox_border_right'] . $advanced['checkbox_border_unit'] : '0';
18 $border_bottom = ( '' !== $advanced['checkbox_border_bottom'] ) ? $advanced['checkbox_border_bottom'] . $advanced['checkbox_border_unit'] : '0';
19 $border_left = ( '' !== $advanced['checkbox_border_left'] ) ? $advanced['checkbox_border_left'] . $advanced['checkbox_border_unit'] : '0';
20
21 $border_width = $border_top . ' ' . $border_right . ' ' . $border_bottom . ' ' . $border_left;
22 $border_style = $advanced['checkbox_border_type'];
23
24 $border_color_default = $colors['optin_check_radio_bo'];
25 $border_color_checked = $colors['optin_check_radio_bo_checked'];
26
27 $mobile_border_top = ( '' !== $advanced['checkbox_border_top_mobile'] ) ? $advanced['checkbox_border_top_mobile'] . $advanced['checkbox_border_unit_mobile'] : $border_top;
28 $mobile_border_right = ( '' !== $advanced['checkbox_border_right_mobile'] ) ? $advanced['checkbox_border_right_mobile'] . $advanced['checkbox_border_unit_mobile'] : $border_right;
29 $mobile_border_bottom = ( '' !== $advanced['checkbox_border_bottom_mobile'] ) ? $advanced['checkbox_border_bottom_mobile'] . $advanced['checkbox_border_unit_mobile'] : $border_bottom;
30 $mobile_border_left = ( '' !== $advanced['checkbox_border_left_mobile'] ) ? $advanced['checkbox_border_left_mobile'] . $advanced['checkbox_border_unit_mobile'] : $border_left;
31
32 $mobile_border_width = $mobile_border_top . ' ' . $mobile_border_right . ' ' . $mobile_border_bottom . ' ' . $mobile_border_left;
33 $mobile_border_style = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $border_style : $advanced['checkbox_border_type_mobile'];
34
35 // SETTINGS: Border Radius.
36 $radius_topleft = ( '' !== $advanced['checkbox_radius_top_left'] ) ? $advanced['checkbox_radius_top_left'] . $advanced['checkbox_radius_unit'] : '0';
37 $radius_topright = ( '' !== $advanced['checkbox_radius_top_right'] ) ? $advanced['checkbox_radius_top_right'] . $advanced['checkbox_radius_unit'] : '0';
38 $radius_bottomright = ( '' !== $advanced['checkbox_radius_bottom_right'] ) ? $advanced['checkbox_radius_bottom_right'] . $advanced['checkbox_radius_unit'] : '0';
39 $radius_bottomleft = ( '' !== $advanced['checkbox_radius_bottom_left'] ) ? $advanced['checkbox_radius_bottom_left'] . $advanced['checkbox_radius_unit'] : '0';
40
41 $border_radius = $radius_topleft . ' ' . $radius_topright . ' ' . $radius_bottomright . ' ' . $radius_bottomleft;
42
43 $mobile_radius_topleft = ( '' !== $advanced['checkbox_radius_top_left_mobile'] ) ? $advanced['checkbox_radius_top_left_mobile'] . $advanced['checkbox_radius_unit_mobile'] : $radius_topleft;
44 $mobile_radius_topright = ( '' !== $advanced['checkbox_radius_top_right_mobile'] ) ? $advanced['checkbox_radius_top_right_mobile'] . $advanced['checkbox_radius_unit_mobile'] : $radius_topright;
45 $mobile_radius_bottomright = ( '' !== $advanced['checkbox_radius_bottom_right_mobile'] ) ? $advanced['checkbox_radius_bottom_right_mobile'] . $advanced['checkbox_radius_unit_mobile'] : $radius_bottomright;
46 $mobile_radius_bottomleft = ( '' !== $advanced['checkbox_radius_bottom_left_mobile'] ) ? $advanced['checkbox_radius_bottom_left_mobile'] . $advanced['checkbox_radius_unit_mobile'] : $radius_bottomleft;
47
48 $mobile_border_radius = $mobile_radius_topleft . ' ' . $mobile_radius_topright . ' ' . $mobile_radius_bottomright . ' ' . $mobile_radius_bottomleft;
49 $mobile_border_radius = ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_advanced ) ) ? $border_radius : $mobile_border_radius;
50
51 // SETTINGS: Background.
52 $background_color_default = $colors['optin_check_radio_bg'];
53 $background_color_checked = $colors['optin_check_radio_bg_checked'];
54
55 // SETTINGS: Font settings.
56 $color = $colors['optin_mailchimp_labels_color'];
57 $font_family = $typography['checkbox_font_family'];
58 $font_size = $typography['checkbox_font_size'] . $typography['checkbox_font_size_unit'];
59 $font_weight = $typography['checkbox_font_weight'];
60 $font_style = 'normal';
61 $alignment = ( ! $is_rtl ) ? $typography['checkbox_alignment'] : 'right';
62 $line_height = $typography['checkbox_line_height'] . $typography['checkbox_line_height_unit'];
63 $letter_spacing = $typography['checkbox_letter_spacing'] . $typography['checkbox_letter_spacing_unit'];
64 $text_transform = $typography['checkbox_text_transform'];
65 $text_decoration = $typography['checkbox_text_decoration'];
66
67 if ( 'custom' === $font_family ) {
68 $font_family = ( '' !== $typography['checkbox_custom_font_family'] ) ? $typography['checkbox_custom_font_family'] : 'inherit';
69 }
70
71 if ( 'regular' === $font_weight ) {
72 $font_weight = 'normal';
73 } elseif ( 'italic' === $font_weight ) {
74 $font_weight = 'normal';
75 $font_style = 'italic';
76 } elseif ( preg_match( '/(italic)/', $font_weight ) ) { // Check if font weight is italic.
77 $font_weight = str_replace( 'italic', '', $font_weight );
78 $font_style = 'italic';
79 }
80
81 $mobile_font_size = ( '' !== $typography['checkbox_font_size_mobile'] ) ? $typography['checkbox_font_size_mobile'] . $typography['checkbox_font_size_unit_mobile'] : $font_size;
82 $mobile_font_weight = $typography['checkbox_font_weight_mobile'];
83 $mobile_font_style = 'normal';
84 $mobile_alignment = ( ! $is_rtl ) ? $typography['checkbox_alignment_mobile'] : 'right';
85 $mobile_line_height = ( '' !== $typography['checkbox_line_height_mobile'] ) ? $typography['checkbox_line_height_mobile'] . $typography['checkbox_line_height_unit_mobile'] : $line_height;
86 $mobile_letter_spacing = ( '' !== $typography['checkbox_letter_spacing_mobile'] ) ? $typography['checkbox_letter_spacing_mobile'] . $typography['checkbox_letter_spacing_unit_mobile'] : $letter_spacing;
87 $mobile_text_transform = $typography['checkbox_text_transform'];
88 $mobile_text_decoration = $typography['checkbox_text_decoration_mobile'];
89
90 if ( 'regular' === $mobile_font_weight ) {
91 $mobile_font_weight = 'normal';
92 } elseif ( 'italic' === $font_weight ) {
93 $font_weight = 'normal';
94 $font_style = 'italic';
95 } elseif ( preg_match( '/(italic)/', $mobile_font_weight ) ) { // Check if font weight is italic.
96 $mobile_font_weight = str_replace( 'italic', '', $mobile_font_weight );
97 $mobile_font_style = 'italic';
98 }
99
100 if ( ! $is_mobile_enabled || ( $is_mobile_enabled && $default_typography ) ) {
101 $mobile_font_size = $font_size;
102 $mobile_font_weight = $font_weight;
103 $mobile_font_style = $font_style;
104 $mobile_alignment = $alignment;
105 $mobile_line_height = $line_height;
106 $mobile_letter_spacing = $letter_spacing;
107 $mobile_text_transform = $text_transform;
108 $mobile_text_decoration = $text_decoration;
109 }
110
111 // SETTINGS: Icon.
112 $icon = $colors['optin_check_radio_tick_color'];
113
114 // ==================================================
115 // Check if is an opt-in module.
116 if ( $is_optin ) {
117
118 $style .= ' ';
119
120 // Mobile styles.
121 $style .= $prefix_mobile . $component . ' span[aria-hidden] {';
122 $style .= 'border-width: ' . $mobile_border_width . ';';
123 $style .= 'border-style: ' . $mobile_border_style . ';';
124 $style .= ( ! $is_vanilla ) ? 'border-color: ' . $border_color_default . ';' : '';
125 $style .= 'border-radius: ' . $mobile_border_radius . ';';
126 $style .= ( ! $is_vanilla ) ? 'background-color: ' . $background_color_default . ';' : '';
127 $style .= '}';
128
129 $style .= $prefix_mobile . $component . ' span:not([aria-hidden]) {';
130 $style .= ( ! $is_vanilla ) ? 'color: ' . $color . ';' : '';
131 $style .= ( 'inherit' !== $font_family ) ? 'font: ' . $mobile_font_weight . ' ' . $mobile_font_size . '/' . $mobile_line_height . ' ' . $font_family . ';' : '';
132 $style .= ( 'inherit' === $font_family ) ? 'font-size: ' . $mobile_font_size . ';' : '';
133 $style .= ( 'inherit' === $font_family ) ? 'line-height: ' . $mobile_line_height . ';' : '';
134 $style .= ( 'inherit' === $font_family ) ? 'font-weight: ' . $mobile_font_weight . ';' : '';
135 $style .= 'font-style: ' . $mobile_font_style . ';';
136 $style .= 'letter-spacing: ' . $mobile_letter_spacing . ';';
137 $style .= 'text-transform: ' . $mobile_text_transform . ';';
138 $style .= 'text-decoration: ' . $mobile_text_decoration . ';';
139 $style .= 'text-align: ' . $mobile_alignment . ';';
140 $style .= '}';
141
142 if ( ! $is_vanilla ) {
143
144 $style .= $prefix_mobile . $component . ' input:checked + span[aria-hidden] {';
145 $style .= 'border-color: ' . $border_color_checked . ';';
146 $style .= 'background-color: ' . $background_color_checked . ';';
147 $style .= '}';
148
149 $style .= $prefix_mobile . $component . ' input:checked + span[aria-hidden]:before {';
150 $style .= 'color: ' . $icon . ';';
151 $style .= '}';
152
153 }
154
155 // Desktop styles.
156 $style .= $breakpoint . ' {';
157 $style .= $prefix_desktop . $component . ' span[aria-hidden] {';
158 $style .= 'border-width: ' . $border_width . ';';
159 $style .= 'border-style: ' . $border_style . ';';
160 $style .= 'border-radius: ' . $border_radius . ';';
161 $style .= '}';
162 $style .= $prefix_desktop . $component . ' span:not([aria-hidden]) {';
163 $style .= ( 'inherit' !== $font_family ) ? 'font: ' . $font_weight . ' ' . $font_size . '/' . $line_height . ' ' . $font_family . ';' : '';
164 $style .= ( 'inherit' === $font_family ) ? 'font-size: ' . $font_size . ';' : '';
165 $style .= ( 'inherit' === $font_family ) ? 'line-height: ' . $line_height . ';' : '';
166 $style .= ( 'inherit' === $font_family ) ? 'font-weight: ' . $font_weight . ';' : '';
167 $style .= 'font-style: ' . $font_style . ';';
168 $style .= 'letter-spacing: ' . $letter_spacing . ';';
169 $style .= 'text-transform: ' . $text_transform . ';';
170 $style .= 'text-decoration: ' . $text_decoration . ';';
171 $style .= 'text-align: ' . $alignment . ';';
172 $style .= '}';
173 $style .= '}';
174 }
175