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-02--form-fields.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-02--form-fields.php
138 lines
1 <?php
2 /**
3 * Form fields settings.
4 *
5 * @package Hustle
6 * @since 4.3.0
7 */
8
9 $container = '.hustle-form .hustle-form-fields';
10 $component = $container . ' .hustle-field';
11
12 // SETTINGS: Layout.
13 $layout = $design['optin_form_layout'];
14 $mobile_layout = ( $is_mobile_enabled ) ? $design['optin_form_layout_mobile'] : $layout;
15
16 // SETTINGS: Desktop proximity.
17 $custom_proximity = $design['customize_form_fields_proximity'];
18 $gap_value = ( '' !== $design['form_fields_proximity_value'] ) ? $design['form_fields_proximity_value'] : '0';
19 $gap_unit = $design['form_fields_proximity_unit'];
20
21 $gap_full = ( '1' === $custom_proximity ) ? $gap_value . $gap_unit : '1px';
22 $gap_half = ( '1' === $custom_proximity ) ? ( $gap_value / 2 ) . $gap_unit : '0.5px';
23
24 // SETTINGS: Mobile proximity.
25 $mobile_custom_proximity = $design['customize_form_fields_proximity_mobile'];
26 $mobile_gap_value = ( '' !== $design['form_fields_proximity_value_mobile'] ) ? $design['form_fields_proximity_value_mobile'] : $gap_value;
27 $mobile_gap_unit = $design['form_fields_proximity_unit_mobile'];
28
29 $mobile_gap_full = ( '1' === $mobile_custom_proximity ) ? $mobile_gap_value . $mobile_gap_unit : '1px';
30 $mobile_gap_half = ( '1' === $mobile_custom_proximity ) ? ( $mobile_gap_value / 2 ) . $mobile_gap_unit : '0.5px';
31
32 if ( ! $is_mobile_enabled ) {
33 $mobile_gap_full = $gap_full;
34 $mobile_gap_half = $gap_half;
35 }
36
37 // ==================================================
38 // Check if is an opt-in module.
39 if ( $is_optin ) {
40
41 if ( 'inline' === $mobile_layout ) {
42 $style .= $prefix_mobile . $container . ' {';
43 $style .= 'display: -webkit-box;';
44 $style .= 'display: -ms-flex;';
45 $style .= 'display: flex;';
46 $style .= '-ms-flex-wrap: wrap;';
47 $style .= 'flex-wrap: wrap;';
48 $style .= '-webkit-box-align: center;';
49 $style .= '-ms-flex-align: center;';
50 $style .= 'align-items: center;';
51 $style .= 'margin-top: -' . $mobile_gap_half . ';';
52 $style .= 'margin-bottom: -' . $mobile_gap_half . ';';
53 $style .= '}';
54 $style .= $prefix_mobile . $component . ' {';
55 $style .= 'min-width: 100px;';
56 $style .= '-webkit-box-flex: 1;';
57 $style .= '-ms-flex: 1;';
58 $style .= 'flex: 1;';
59 $style .= 'margin-top: ' . $mobile_gap_half . ';';
60 $style .= 'margin-right: ' . $mobile_gap_full . ';';
61 $style .= 'margin-bottom: ' . $mobile_gap_half . ';';
62 $style .= '}';
63 $style .= $prefix_mobile . $container . ' .hustle-button {';
64 $style .= 'width: auto;';
65 $style .= '-webkit-box-flex: 0;';
66 $style .= '-ms-flex: 0 0 auto;';
67 $style .= 'flex: 0 0 auto;';
68 $style .= 'margin-top: ' . $mobile_gap_half . ';';
69 $style .= 'margin-bottom: ' . $mobile_gap_half . ';';
70 $style .= '}';
71 } else {
72 $style .= $prefix_mobile . $container . ' {';
73 $style .= 'display: block;';
74 $style .= '}';
75 $style .= $prefix_mobile . $component . ' {';
76 $style .= 'margin-bottom: ' . $mobile_gap_full . ';';
77 $style .= '}';
78 $style .= $prefix_mobile . $container . ' .hustle-button {';
79 $style .= 'width: 100%;';
80 $style .= '}';
81 }
82
83 if ( $is_mobile_enabled ) {
84
85 if ( 'inline' === $layout ) {
86 $style .= $breakpoint . ' {';
87 $style .= $prefix_desktop . $container . ' {';
88 $style .= ( 'inline' !== $mobile_layout ) ? 'display: -webkit-box;' : '';
89 $style .= ( 'inline' !== $mobile_layout ) ? 'display: -ms-flex;' : '';
90 $style .= ( 'inline' !== $mobile_layout ) ? 'display: flex;' : '';
91 $style .= ( 'inline' !== $mobile_layout ) ? '-ms-flex-wrap: wrap;' : '';
92 $style .= ( 'inline' !== $mobile_layout ) ? 'flex-wrap: wrap;' : '';
93 $style .= ( 'inline' !== $mobile_layout ) ? '-webkit-box-align: center;' : '';
94 $style .= ( 'inline' !== $mobile_layout ) ? '-ms-flex-align: center;' : '';
95 $style .= ( 'inline' !== $mobile_layout ) ? 'align-items: center;' : '';
96 $style .= 'margin-top: -' . $gap_half . ';';
97 $style .= 'margin-bottom: -' . $gap_half . ';';
98 $style .= '}';
99 $style .= $prefix_desktop . $component . ' {';
100 $style .= ( 'inline' !== $mobile_layout ) ? 'min-width: 100px;' : '';
101 $style .= ( 'inline' !== $mobile_layout ) ? '-webkit-box-flex: 1;' : '';
102 $style .= ( 'inline' !== $mobile_layout ) ? '-ms-flex: 1;' : '';
103 $style .= ( 'inline' !== $mobile_layout ) ? 'flex: 1;' : '';
104 $style .= 'margin-top: ' . $gap_half . ';';
105 $style .= 'margin-right: ' . $gap_full . ';';
106 $style .= 'margin-bottom: ' . $gap_half . ';';
107 $style .= '}';
108 $style .= $prefix_desktop . $container . ' .hustle-button {';
109 $style .= ( 'inline' !== $mobile_layout ) ? 'width: auto;' : '';
110 $style .= ( 'inline' !== $mobile_layout ) ? '-webkit-box-flex: 0;' : '';
111 $style .= ( 'inline' !== $mobile_layout ) ? '-ms-flex: 0 0 auto;' : '';
112 $style .= ( 'inline' !== $mobile_layout ) ? 'flex: 0 0 auto;' : '';
113 $style .= 'margin-top: ' . $gap_half . ';';
114 $style .= 'margin-bottom: ' . $gap_half . ';';
115 $style .= '}';
116 $style .= '}';
117 } else {
118 $style .= $breakpoint . ' {';
119 $style .= ( 'inline' === $mobile_layout ) ? $prefix_desktop . $container . ' {' : '';
120 $style .= ( 'inline' === $mobile_layout ) ? 'display: block;' : '';
121 $style .= ( 'inline' === $mobile_layout ) ? '}' : '';
122 $style .= $prefix_desktop . $component . ' {';
123 $style .= ( 'inline' === $mobile_layout ) ? 'min-width: none;' : '';
124 $style .= ( 'inline' === $mobile_layout ) ? 'min-width: unset;' : '';
125 $style .= ( 'inline' === $mobile_layout ) ? 'margin-top: 0;' : '';
126 $style .= ( 'inline' === $mobile_layout ) ? 'margin-right: 0;' : '';
127 $style .= 'margin-bottom: ' . $gap_full . ';';
128 $style .= '}';
129 $style .= ( 'inline' === $mobile_layout ) ? $prefix_desktop . $container . ' .hustle-button {' : '';
130 $style .= ( 'inline' === $mobile_layout ) ? 'width: 100%;' : '';
131 $style .= ( 'inline' === $mobile_layout ) ? 'margin-top: 0;' : '';
132 $style .= ( 'inline' === $mobile_layout ) ? 'margin-bottom: 0;' : '';
133 $style .= ( 'inline' === $mobile_layout ) ? '}' : '';
134 $style .= '}';
135 }
136 }
137 }
138