PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.3.7
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.3.7
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 / module-size-popup.php
wordpress-popup / inc / front / non-sshare-styles Last commit date
form-01--form-container.php 5 years ago form-02--form-fields.php 5 years ago form-03--input.php 5 years ago form-04--select2.php 5 years ago form-05--select2-dropdown.php 5 years ago form-06--timepicker-dropdown.php 5 years ago form-07--radio.php 5 years ago form-08--checkbox.php 5 years ago form-09--calendar.php 5 years ago form-10--submit.php 5 years ago form-11--options-container.php 5 years ago form-12--options-title.php 5 years ago form-13--gdpr.php 5 years ago form-14--error-message.php 5 years ago form-15--success-message.php 5 years ago form-16--recaptcha.php 5 years ago general-01--module-container.php 5 years ago general-02--main-layout.php 5 years ago general-03--layout-header.php 5 years ago general-04--layout-content.php 5 years ago general-05--layout-footer.php 5 years ago general-06--image-size.php 5 years ago general-07--image-fitting.php 5 years ago general-08--image-position.php 5 years ago general-09--content-wrapper.php 5 years ago general-10--title.php 5 years ago general-11--subtitle.php 5 years ago general-12--content.php 5 years ago general-13--cta-container.php 5 years ago general-14--cta-button.php 5 years ago general-15--cta-alignment.php 5 years ago general-16--nsa-link.php 5 years ago general-17--close-button.php 5 years ago general-18--popup-mask.php 5 years ago module-size-embed.php 5 years ago module-size-popup.php 5 years ago module-size-slidein.php 5 years ago
module-size-popup.php
124 lines
1 <?php
2 /**
3 * Pop-up custom size settings.
4 *
5 * @package Hustle
6 * @since 4.3.0
7 */
8
9 // phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect
10
11 $component = '.hustle-popup-content';
12
13 $is_desktop_custom = ( '1' === $design['customize_size'] );
14 $is_mobile_custom = ( '1' === $design['customize_size_mobile'] );
15
16 // SETTINGS: Width.
17 $desktop_width = $design['custom_width'];
18 $desktop_width = ( '' !== $desktop_width ) ? $desktop_width . $design['custom_width_unit'] : '800px';
19 $desktop_width = ( 'auto' !== $design['custom_width_unit'] ) ? $desktop_width : '';
20
21 $mobile_width = $design['custom_width_mobile'];
22 $mobile_width = ( '' !== $mobile_width ) ? $mobile_width . $design['custom_width_unit_mobile'] : '';
23 $mobile_width = ( 'auto' !== $design['custom_width_unit_mobile'] ) ? $mobile_width : '';
24
25 // SETTINGS: Height.
26 $desktop_height = $design['custom_height'];
27 $desktop_height = ( '' !== $desktop_height ) ? $desktop_height . $design['custom_height_unit'] : '';
28 $desktop_height = ( 'auto' !== $design['custom_height_unit'] ) ? $desktop_height : '';
29
30 $mobile_height = $design['custom_height_mobile'];
31 $mobile_height = ( '' !== $mobile_height ) ? $mobile_height . $design['custom_height_unit_mobile'] : '';
32 $mobile_height = ( 'auto' !== $design['custom_height_unit_mobile'] ) ? $mobile_height : '';
33
34 // Check if module is pop-up.
35 if ( $is_popup ) {
36
37 $style .= '';
38
39 if ( $is_vanilla ) {
40
41 $style .= $prefix_mobile . $component . ' {';
42 $style .= 'max-width: 800px;';
43 $style .= '}';
44
45 } else {
46
47 // Mobile settings.
48 if ( $is_mobile_enabled && $is_mobile_custom ) {
49
50 if ( '' !== $mobile_width || '' !== $mobile_height ) {
51
52 $style .= $breakpoint_sm . ' {';
53 $style .= $prefix_mobile . $component . ' {';
54 $style .= ( '' !== $mobile_width ) ? 'max-width: ' . $mobile_width . ';' : '';
55 $style .= ( '' !== $mobile_height ) ? 'max-height: ' . $mobile_height . ';' : '';
56 $style .= ( '' !== $mobile_height ) ? 'overflow-y: auto;' : '';
57 $style .= '}';
58 $style .= '}';
59
60 if ( '' !== $mobile_height ) {
61
62 if ( $is_optin ) {
63 $style .= $breakpoint_sm . ' {';
64 $style .= $prefix_mobile . $component . ' .hustle-layout {';
65 $style .= 'max-height: calc(' . $mobile_height . ' - 30px);';
66 $style .= '}';
67 $style .= '}';
68 } else {
69 $style .= $breakpoint_sm . ' {';
70 $style .= $prefix_mobile . $component . ' .hustle-info {';
71 $style .= 'max-height: calc(100% - 30px);';
72 $style .= '}';
73 $style .= '}';
74 }
75 }
76 }
77 }
78
79 // Desktop settings.
80 if ( $is_desktop_custom ) {
81
82 $style .= $breakpoint . ' {';
83 $style .= $prefix_desktop . $component . ' {';
84 $style .= 'max-width: ' . $desktop_width . ';';
85 $style .= ( '' !== $desktop_height ) ? 'max-height: ' . $desktop_height . ';' : 'max-height: none;';
86 $style .= ( '' !== $desktop_height ) ? 'max-height: ' . $desktop_height . ';' : 'max-height: unset;';
87 $style .= ( '' !== $desktop_height ) ? 'overflow-y: auto;' : 'overflow-y: initial;';
88 $style .= '}';
89 $style .= '}';
90
91 if ( '' !== $desktop_height ) {
92
93 if ( $is_optin ) {
94 $style .= $breakpoint . ' {';
95 $style .= $prefix_desktop . $component . ' .hustle-layout {';
96 $style .= 'max-height: calc(' . $desktop_height . ' - 30px);';
97 $style .= '}';
98 $style .= '}';
99 } else {
100 $style .= $breakpoint . ' {';
101 $style .= $prefix_desktop . $component . ' .hustle-info {';
102 $style .= 'max-height: calc(100% - 30px);';
103 $style .= '}';
104 $style .= '}';
105 }
106 } else {
107
108 if ( '' !== $mobile_height ) {
109 $style .= $breakpoint . ' {';
110 $style .= $prefix_desktop . $component . ( $is_optin ) ? ' .hustle-layout {' : ' .hustle-info {';
111 $style .= 'max-height: none;';
112 $style .= 'max-height: unset;';
113 $style .= '}';
114 $style .= '}';
115 }
116 }
117 } else {
118 $style .= $prefix_mobile . $component . ' {';
119 $style .= 'max-width: 800px;';
120 $style .= '}';
121 }
122 }
123 }
124