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 / module-size-popup.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
module-size-popup.php
121 lines
1 <?php
2 /**
3 * Pop-up custom size settings.
4 *
5 * @package Hustle
6 * @since 4.3.0
7 */
8
9 $component = '.hustle-popup-content';
10
11 $is_desktop_custom = ( '1' === $design['customize_size'] );
12 $is_mobile_custom = ( '1' === $design['customize_size_mobile'] );
13
14 // SETTINGS: Width.
15 $desktop_width = $design['custom_width'];
16 $desktop_width = ( '' !== $desktop_width ) ? $desktop_width . $design['custom_width_unit'] : '800px';
17 $desktop_width = ( 'auto' !== $design['custom_width_unit'] ) ? $desktop_width : '';
18
19 $mobile_width = $design['custom_width_mobile'];
20 $mobile_width = ( '' !== $mobile_width ) ? $mobile_width . $design['custom_width_unit_mobile'] : '';
21 $mobile_width = ( 'auto' !== $design['custom_width_unit_mobile'] ) ? $mobile_width : '';
22
23 // SETTINGS: Height.
24 $desktop_height = $design['custom_height'];
25 $desktop_height = ( '' !== $desktop_height ) ? $desktop_height . $design['custom_height_unit'] : '';
26 $desktop_height = ( 'auto' !== $design['custom_height_unit'] ) ? $desktop_height : '';
27
28 $mobile_height = $design['custom_height_mobile'];
29 $mobile_height = ( '' !== $mobile_height ) ? $mobile_height . $design['custom_height_unit_mobile'] : '';
30 $mobile_height = ( 'auto' !== $design['custom_height_unit_mobile'] ) ? $mobile_height : '';
31
32 // Check if module is pop-up.
33 if ( $is_popup ) {
34
35 $style .= '';
36
37 if ( $is_vanilla ) {
38
39 $style .= $prefix_mobile . $component . ' {';
40 $style .= 'max-width: 800px;';
41 $style .= '}';
42
43 } else {
44
45
46 // Desktop settings.
47 if ( $is_desktop_custom ) {
48
49 $style .= $breakpoint . ' {';
50 $style .= $prefix_desktop . $component . ' {';
51 $style .= 'max-width: ' . $desktop_width . ';';
52 $style .= ( '' !== $desktop_height ) ? 'max-height: ' . $desktop_height . ';' : 'max-height: none;';
53 $style .= ( '' !== $desktop_height ) ? 'max-height: ' . $desktop_height . ';' : 'max-height: unset;';
54 $style .= ( '' !== $desktop_height ) ? 'overflow-y: auto;' : 'overflow-y: initial;';
55 $style .= '}';
56 $style .= '}';
57
58 if ( '' !== $desktop_height ) {
59
60 if ( $is_optin ) {
61 $style .= $breakpoint . ' {';
62 $style .= $prefix_desktop . $component . ' .hustle-layout {';
63 $style .= 'max-height: calc(' . $desktop_height . ' - 30px);';
64 $style .= '}';
65 $style .= '}';
66 } else {
67 $style .= $breakpoint . ' {';
68 $style .= $prefix_desktop . $component . ' .hustle-info {';
69 $style .= 'max-height: calc(100% - 30px);';
70 $style .= '}';
71 $style .= '}';
72 }
73 } elseif ( '' !== $mobile_height ) {
74
75 $style .= $breakpoint . ' {';
76 $style .= $prefix_desktop . $component . ( $is_optin ) ? ' .hustle-layout {' : ' .hustle-info {';
77 $style .= 'max-height: none;';
78 $style .= 'max-height: unset;';
79 $style .= '}';
80 $style .= '}';
81 }
82 } else {
83 $style .= $prefix_mobile . $component . ' {';
84 $style .= 'max-width: 800px;';
85 $style .= '}';
86 }
87
88 // Mobile settings.
89 if ( $is_mobile_enabled && $is_mobile_custom ) {
90
91 if ( '' !== $mobile_width || '' !== $mobile_height ) {
92
93 $style .= $breakpoint_sm . ' {';
94 $style .= $prefix_mobile . $component . ' {';
95 $style .= ( '' !== $mobile_width ) ? 'max-width: ' . $mobile_width . ';' : '';
96 $style .= ( '' !== $mobile_height ) ? 'max-height: ' . $mobile_height . ';' : '';
97 $style .= ( '' !== $mobile_height ) ? 'overflow-y: auto;' : '';
98 $style .= '}';
99 $style .= '}';
100
101 if ( '' !== $mobile_height ) {
102
103 if ( $is_optin ) {
104 $style .= $breakpoint_sm . ' {';
105 $style .= $prefix_mobile . $component . ' .hustle-layout {';
106 $style .= 'max-height: calc(' . $mobile_height . ' - 30px);';
107 $style .= '}';
108 $style .= '}';
109 } else {
110 $style .= $breakpoint_sm . ' {';
111 $style .= $prefix_mobile . $component . ' .hustle-info {';
112 $style .= 'max-height: calc(100% - 30px);';
113 $style .= '}';
114 $style .= '}';
115 }
116 }
117 }
118 }
119 }
120 }
121