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 / general-17--close-button.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
general-17--close-button.php
137 lines
1 <?php
2 /**
3 * Close Button.
4 *
5 * @package Hustle
6 * @since 4.3.0
7 */
8
9 $component = 'button.hustle-button-close';
10
11 // SETTINGS: Colors.
12 $color_default = $colors['close_button_static_color'];
13 $color_hover = $colors['close_button_hover_color'];
14 $color_focus = $colors['close_button_active_color'];
15 $color_background = $colors['close_button_static_background'];
16
17 // SETTINGS: Icon style.
18 $close_icon_size = $design['close_icon_size'];
19 $close_icon_size_mobile = ( '' !== $design['close_icon_size_mobile'] && $is_mobile_enabled ) ? $design['close_icon_size_mobile'] : $design['close_icon_size'];
20 $icon_style = $design['close_icon_style'];
21 $icon_style_mobile = ( '' !== $design['close_icon_style_mobile'] && $is_mobile_enabled ) ? $design['close_icon_style_mobile'] : $design['close_icon_style'];
22
23 // SETTINGS: Position.
24 $position = $design['close_icon_position'];
25 $position_mobile = ( '' !== $design['close_icon_position_mobile'] && $is_mobile_enabled ) ? $design['close_icon_position_mobile'] : $design['close_icon_position'];
26 $alignment_x = $design['close_icon_alignment_x'];
27 $alignment_x_mobile = ( '' !== $design['close_icon_alignment_x_mobile'] && $is_mobile_enabled ) ? $design['close_icon_alignment_x_mobile'] : $design['close_icon_alignment_x'];
28 $alignment_y = $design['close_icon_alignment_y'];
29 $alignment_y_mobile = ( '' !== $design['close_icon_alignment_y_mobile'] && $is_mobile_enabled ) ? $design['close_icon_alignment_y_mobile'] : $design['close_icon_alignment_y'];
30
31 if ( ! $is_embed && ! $is_vanilla ) {
32
33 $style .= '';
34
35 $style .= $component . ' .hustle-icon-close:before {';
36 $style .= 'font-size: inherit;';
37 $style .= '}';
38
39 // Mobile styles.
40 $style .= $prefix_mobile . $component . ' {';
41 $style .= 'color: ' . $color_default . ';';
42 $style .= ( ! empty( $color_background ) && 'flat' !== $icon_style_mobile ) ? 'background: ' . $color_background . ';' : 'background: transparent;';
43 $style .= ( 'circle' === $icon_style_mobile ) ? 'border-radius: 100%;' : 'border-radius: 0;';
44 $style .= 'position: absolute;';
45 $style .= 'z-index: 1;';
46 $style .= ( 'hidden' === $position_mobile ) ? 'display: none;' : 'display: block;';
47 $style .= 'width: ' . ( $close_icon_size_mobile + 20 ) . 'px;';
48 $style .= 'height: ' . ( $close_icon_size_mobile + 20 ) . 'px;';
49
50 // Alignment x axis.
51 if ( 'center' === $alignment_x_mobile ) {
52 $style .= 'left: 50%;';
53 $style .= 'right: auto;';
54 $style .= 'transform: translateX(-50%);';
55 } else {
56 if ( 'outside' === $position_mobile && 'center' === $alignment_y_mobile ) {
57 $style .= $alignment_x_mobile . ': -' . ( $close_icon_size_mobile + 20 ) . 'px;';
58 } else {
59 $style .= $alignment_x_mobile . ': 0;';
60 }
61 $style .= ( 'left' === $alignment_x_mobile ) ? 'right: auto;' : 'left: auto;';
62 }
63
64 // Alignment y axis.
65 if ( 'center' === $alignment_y_mobile ) {
66 $style .= 'top: 50%;';
67 $style .= 'transform: ' . ( ( 'center' === $alignment_x_mobile ) ? 'translate(-50%, -50%);' : 'translateY(-50%);' );
68 } else {
69 $style .= $alignment_y_mobile . ': 0;';
70 $style .= ( 'top' === $alignment_y_mobile ) ? 'bottom: auto;' : 'top: auto;';
71 }
72
73 if ( 'center' !== $alignment_x_mobile && 'center' !== $alignment_y_mobile ) {
74 $style .= 'transform: unset;';
75 }
76
77 $style .= '}';
78
79 $style .= $prefix_mobile . $component . ' .hustle-icon-close {';
80 $style .= 'font-size: ' . $close_icon_size_mobile . 'px;';
81 $style .= '}';
82
83 $style .= $prefix_mobile . $component . ':hover {';
84 $style .= 'color: ' . $color_hover . ';';
85 $style .= '}';
86
87 $style .= $prefix_mobile . $component . ':focus {';
88 $style .= 'color: ' . $color_focus . ';';
89 $style .= '}';
90
91 // Desktop styles.
92 if ( $is_mobile_enabled ) {
93 $style .= $breakpoint . ' {';
94
95 $style .= $prefix_desktop . $component . ' .hustle-icon-close {';
96 $style .= 'font-size: ' . $close_icon_size . 'px;';
97 $style .= '}';
98
99 $style .= $prefix_desktop . $component . ' {';
100 $style .= ( ! empty( $color_background ) && 'flat' !== $icon_style ) ? 'background: ' . $color_background . ';' : 'background: transparent;';
101 $style .= ( 'circle' === $icon_style ) ? 'border-radius: 100%;' : 'border-radius: 0;';
102 $style .= ( 'hidden' === $position ) ? 'display: none;' : 'display: block;';
103 $style .= 'width: ' . ( $close_icon_size + 20 ) . 'px;';
104 $style .= 'height: ' . ( $close_icon_size + 20 ) . 'px;';
105
106 // Alignment x axis.
107 if ( 'center' === $alignment_x ) {
108 $style .= 'left: 50%;';
109 $style .= 'right: auto;';
110 $style .= 'transform: translateX(-50%);';
111 } else {
112 if ( 'outside' === $position && 'center' === $alignment_y ) {
113 $style .= $alignment_x . ': -' . ( $close_icon_size + 20 ) . 'px;';
114 } else {
115 $style .= $alignment_x . ': 0;';
116 }
117 $style .= ( 'left' === $alignment_x ) ? 'right: auto;' : 'left: auto;';
118 }
119
120 // Alignment y axis.
121 if ( 'center' === $alignment_y ) {
122 $style .= 'top: 50%;';
123 $style .= 'transform: ' . ( ( 'center' === $alignment_x ) ? 'translate(-50%, -50%);' : 'translateY(-50%);' );
124 } else {
125 $style .= $alignment_y . ': 0;';
126 $style .= ( 'top' === $alignment_y ) ? 'bottom: auto;' : 'top: auto;';
127 }
128
129 if ( 'center' !== $alignment_x && 'center' !== $alignment_y ) {
130 $style .= 'transform: unset;';
131 }
132
133 $style .= '}';
134 $style .= '}';
135 }
136 }
137