PluginProbe ʕ •ᴥ•ʔ
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) / 2.4.7
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) v2.4.7
2.9.1 2.9.0 2.8.9 2.8.8 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 2.0 2.0.1 2.0.3 2.0.4 2.0.5 2.0.6 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7
mystickymenu / welcome-bar.php
mystickymenu Last commit date
css 5 years ago fonts 7 years ago images 5 years ago js 5 years ago languages 7 years ago class-review-box.php 6 years ago index.php 8 years ago mystickymenu-affiliate.php 6 years ago mystickymenu-deactivate-form.php 5 years ago mystickymenu-fonts.php 6 years ago mystickymenu-popup.php 6 years ago mystickymenu.php 5 years ago mystickymeny-new-welcomebar.php 5 years ago readme.txt 5 years ago recommended-plugins.php 5 years ago uninstall.php 7 years ago upgrade-to-pro.php 5 years ago welcome-bar.php 5 years ago
welcome-bar.php
1846 lines
1 <?php
2
3 function mysticky_welcome_bar_backend() {
4 $upgarde_url = admin_url("admin.php?page=my-stickymenu-upgrade");
5 $nonce = wp_create_nonce('mysticky_option_welcomebar_update');
6 $nonce_reset = wp_create_nonce('mysticky_option_welcomebar_reset');
7
8 $welcomebar = get_option( 'mysticky_option_welcomebar' );
9 if ( $welcomebar == '' || empty($welcomebar)) {
10 $welcomebar = mysticky_welcomebar_pro_widget_default_fields();
11 }
12 $mysticky_welcomebar_showx_desktop = $mysticky_welcomebar_showx_mobile = '';
13 $mysticky_welcomebar_btn_desktop = $mysticky_welcomebar_btn_mobile = '';
14 $mysticky_welcomebar_display_desktop = $mysticky_welcomebar_display_mobile = '';
15 if( isset($welcomebar['mysticky_welcomebar_x_desktop']) ) {
16 $mysticky_welcomebar_showx_desktop = ' mysticky-welcomebar-showx-desktop';
17 }
18 if( isset($welcomebar['mysticky_welcomebar_x_mobile']) ) {
19 $mysticky_welcomebar_showx_mobile = ' mysticky-welcomebar-showx-mobile';
20 }
21 if( isset($welcomebar['mysticky_welcomebar_btn_desktop']) ) {
22 $mysticky_welcomebar_btn_desktop = ' mysticky-welcomebar-btn-desktop';
23 }
24 if( isset($welcomebar['mysticky_welcomebar_btn_mobile']) ) {
25 $mysticky_welcomebar_btn_mobile = ' mysticky-welcomebar-btn-mobile';
26 }
27
28 if( !isset($welcomebar['mysticky_welcomebar_redirect_rel']) ) {
29 $welcomebar['mysticky_welcomebar_redirect_rel'] = '';
30 }
31 $display = ' mysticky-welcomebar-attention-'.$welcomebar['mysticky_welcomebar_attentionselect'];
32 $display_entry_effect = (isset($welcomebar['mysticky_welcomebar_entry_effect'])) ? ' mysticky-welcomebar-entry-effect-'.$welcomebar['mysticky_welcomebar_entry_effect'] : ' mysticky-welcomebar-entry-effect-slide-in';
33 $display_main_class = "mysticky-welcomebar-position-" . $welcomebar['mysticky_welcomebar_position'] . $mysticky_welcomebar_showx_desktop . $mysticky_welcomebar_showx_mobile . $mysticky_welcomebar_btn_desktop . $mysticky_welcomebar_btn_mobile . $display . $display_entry_effect;
34 ?>
35 <form class="mysticky-welcomebar-form" id="mysticky_welcomebar_form" method="post" action="#">
36 <div class="mysticky-welcomebar-header-title">
37 <h3><?php _e('Welcome Bar', 'myStickymenu'); ?></h3>
38 <label for="mysticky-welcomebar-contact-form-enabled" class="mysticky-welcomebar-switch">
39 <input type="checkbox" id="mysticky-welcomebar-contact-form-enabled" name="mysticky_option_welcomebar[mysticky_welcomebar_enable]" value="1" <?php checked( @$welcomebar['mysticky_welcomebar_enable'], '1' );?> />
40 <span class="slider"></span>
41 </label>
42 </div>
43 <div class="mysticky-welcomebar-setting-wrap">
44 <div class="mysticky-welcomebar-setting-left">
45 <div class="mysticky-welcomebar-setting-block">
46 <div class="mysticky-welcomebar-subheader-title">
47 <h4><?php _e('Design', 'myStickymenu'); ?></h4>
48 </div>
49 <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-setting-position">
50 <label><?php _e('Position', 'myStickymenu'); ?></label>
51 <div class="mysticky-welcomebar-setting-content-right">
52 <label>
53 <input name="mysticky_option_welcomebar[mysticky_welcomebar_position]" value= "top" type="radio" <?php checked( @$welcomebar['mysticky_welcomebar_position'], 'top' );?> />
54 <?php _e("Top", 'mystickymenu'); ?>
55 </label>
56 <label>
57 <input name="mysticky_option_welcomebar[mysticky_welcomebar_position]" value="bottom" type="radio" disabled />
58 <?php _e("Bottom", 'mystickymenu'); ?>
59 </label>
60 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
61 </div>
62 </div>
63 <div class="mysticky-welcomebar-setting-content">
64 <label><?php _e('Height', 'myStickymenu'); ?></label>
65 <div class="mysticky-welcomebar-setting-content-right">
66 <div class="px-wrap">
67 <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_height" name="mysticky_option_welcomebar[mysticky_welcomebar_height]" value="60" disabled />
68 <span class="input-px">PX</span>
69 </div>
70 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
71 </div>
72 </div>
73 <div class="mysticky-welcomebar-setting-content">
74 <label><?php _e('Background Color', 'myStickymenu'); ?></label>
75 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker">
76 <input type="text" id="mysticky_welcomebar_bgcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_bgcolor]" class="my-color-field" data-alpha="true" value="<?php echo $welcomebar['mysticky_welcomebar_bgcolor'];?>" />
77 </div>
78 </div>
79 <div class="mysticky-welcomebar-setting-content">
80 <label><?php _e('Background Text Color', 'myStickymenu'); ?></label>
81 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker">
82 <input type="text" id="mysticky_welcomebar_bgtxtcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_bgtxtcolor]" class="my-color-field" data-alpha="true" value="<?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'];?>" />
83 </div>
84 </div>
85 <div class="mysticky-welcomebar-setting-content">
86 <label><?php _e('Font', 'myStickymenu'); ?></label>
87 <div class="mysticky-welcomebar-setting-content-right">
88 <select name="mysticky_option_welcomebar[mysticky_welcomebar_font]" class="form-fonts">
89 <option value=""><?php _e( 'Select font family', 'myStickymenu' );?></option>
90 <?php $group= ''; foreach( myStickymenu_fonts() as $key=>$value):
91 if ($value != $group){
92 echo '<optgroup label="' . $value . '">';
93 $group = $value;
94 }
95 ?>
96 <option value="<?php echo esc_attr($key);?>" <?php selected( @$welcomebar['mysticky_welcomebar_font'], $key ); ?>><?php echo esc_html($key);?></option>
97 <?php endforeach;?>
98 </select>
99 </div>
100 </div>
101 <div class="mysticky-welcomebar-setting-content">
102 <label><?php _e('Font Size', 'myStickymenu'); ?></label>
103 <div class="mysticky-welcomebar-setting-content-right">
104 <div class="px-wrap">
105 <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_fontsize" name="mysticky_option_welcomebar[mysticky_welcomebar_fontsize]" value="<?php echo @$welcomebar['mysticky_welcomebar_fontsize'];?>" />
106 <span class="input-px">PX</span>
107 </div>
108 </div>
109 </div>
110 <div class="mysticky-welcomebar-setting-content">
111 <label><?php _e('Bar Text', 'myStickymenu'); ?></label>
112 <div class="mysticky-welcomebar-setting-content-right">
113 <?php
114 $settings = array(
115 'media_buttons' => false,
116 'textarea_name' => 'mysticky_option_welcomebar[mysticky_welcomebar_bar_text]',
117 'tinymce' => false,
118 'quicktags' => array(
119 'buttons' => 'strong,em,link'
120 )
121 );
122 wp_editor( stripslashes($welcomebar['mysticky_welcomebar_bar_text']), 'mysticky_bar_text', $settings );
123 // add more buttons to the html editor
124 function underline_tag_add_quicktags() {
125 if ( wp_script_is('quicktags') ){ ?>
126 <script type="text/javascript">
127 QTags.addButton( 'underline_tag', 'U', '<u>', '</u>', 'underline', 'underline', 20, '' );
128 </script>
129 <?php
130 }
131 }
132 add_action( 'admin_print_footer_scripts', 'underline_tag_add_quicktags' );
133 ?>
134 <!--<textarea id="mysticky_bar_text" class="mystickyinput" name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]" rows="4" style="display: none;"><?php echo stripslashes($welcomebar['mysticky_welcomebar_bar_text']);?> </textarea>-->
135 </div>
136 </div>
137 <div class="mysticky-welcomebar-setting-content">
138 <label><?php _e('Show X', 'myStickymenu'); ?></label>
139 <div class="mysticky-welcomebar-setting-content-right">
140 <label>
141 <input name="mysticky_option_welcomebar[mysticky_welcomebar_x_desktop]" value= "desktop" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_x_desktop'], 'desktop' );?> />
142 <?php _e( 'Desktop', 'mystickymenu' );?>
143 </label>
144 <label>
145 <input name="mysticky_option_welcomebar[mysticky_welcomebar_x_mobile]" value= "mobile" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_x_mobile'], 'mobile' );?> />
146 <?php _e( 'Mobile', 'mystickymenu' );?>
147 </label>
148 </div>
149 </div>
150 </div>
151 <div class="mysticky-welcomebar-setting-block">
152 <div class="mysticky-welcomebar-subheader-title">
153 <h4><?php _e('Button', 'myStickymenu'); ?></h4>
154 </div>
155 <div class="mysticky-welcomebar-setting-content">
156 <label><?php _e('Button', 'myStickymenu'); ?></label>
157 <div class="mysticky-welcomebar-setting-content-right">
158 <label>
159 <input name="mysticky_option_welcomebar[mysticky_welcomebar_btn_desktop]" value= "desktop" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_btn_desktop'], 'desktop' );?> />
160 <?php _e( 'Desktop', 'mystickymenu' );?>
161 </label>
162 <label>
163 <input name="mysticky_option_welcomebar[mysticky_welcomebar_btn_mobile]" value= "mobile" type="checkbox"<?php checked( @$welcomebar['mysticky_welcomebar_btn_mobile'], 'mobile' );?> />
164 <?php _e( 'Mobile', 'mystickymenu' );?>
165 </label>
166 </div>
167 </div>
168 <div class="mysticky-welcomebar-setting-content">
169 <label><?php _e('Button Color', 'myStickymenu'); ?></label>
170 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker mysticky_welcomebar_btn_color">
171 <input type="text" id="mysticky_welcomebar_btncolor" name="mysticky_option_welcomebar[mysticky_welcomebar_btncolor]" class="my-color-field" data-alpha="true" value="<?php echo esc_attr($welcomebar['mysticky_welcomebar_btncolor']);?>" />
172 </div>
173 </div>
174 <div class="mysticky-welcomebar-setting-content">
175 <label><?php _e('Button Text Color', 'myStickymenu'); ?></label>
176 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker mysticky_welcomebar_btn_color">
177 <input type="text" id="mysticky_welcomebar_btntxtcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_btntxtcolor]" class="my-color-field" data-alpha="true" value="<?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'];?>" />
178 </div>
179 </div>
180 <div class="mysticky-welcomebar-setting-content">
181 <label><?php _e('Button Text', 'myStickymenu'); ?></label>
182 <div class="mysticky-welcomebar-setting-content-right">
183 <input type="text" id="mysticky_welcomebar_btn_text" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_btn_text]" value="<?php echo $welcomebar['mysticky_welcomebar_btn_text'];?>" />
184 </div>
185 </div>
186 <!-- -->
187 <div class="mysticky-welcomebar-setting-content">
188 <label><?php _e('Attention Effect', 'myStickymenu'); ?></label>
189 <div class="mysticky-welcomebar-setting-content-right">
190 <div class="mysticky-welcomebar-setting-attention">
191 <select name="mysticky_option_welcomebar[mysticky_welcomebar_attentionselect]" class="mysticky-welcomebar-attention mysticky_welcomebar_disable">
192 <option value="default" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], ' ' ); ?>><?php _e( 'None', 'myStickymenu' );?></option>
193 <option value="flash" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'flash' ); ?>><?php _e( 'Flash', 'myStickymenu' );?></option>
194 <option value="shake" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'shake' ); ?>><?php _e( 'Shake', 'myStickymenu' );?></option>
195 <option value="swing" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'swing' ); ?>><?php _e( 'Swing', 'myStickymenu' );?></option>
196 <option value="tada" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'tada' ); ?>><?php _e( 'Tada', 'myStickymenu' );?></option>
197 <option value="heartbeat" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'heartbeat' ); ?>><?php _e( 'Heartbeat', 'myStickymenu' );?></option>
198 <option value="wobble" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'wobble' ); ?>><?php _e( 'Wobble', 'myStickymenu' );?></option>
199 </select>
200 </div>
201 </div>
202 </div>
203 <!-- -->
204 <div class="mysticky-welcomebar-setting-content">
205 <label><?php _e('Button Submission', 'myStickymenu'); ?></label>
206 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-redirect-wrap">
207 <div class="mysticky-welcomebar-setting-action">
208 <select name="mysticky_option_welcomebar[mysticky_welcomebar_actionselect]" class="mysticky-welcomebar-action mysticky_welcomebar_disable">
209 <option value="redirect_to_url" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'redirect_to_url' ); ?>><?php _e( 'Redirect to URL', 'myStickymenu' );?></option>
210 <option value="close_bar" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'close_bar' ); ?>><?php _e( 'Close bar', 'myStickymenu' );?></option>
211 <option value="thankyou_screen" data-href="<?php echo esc_url($upgarde_url); ?>"><?php _e( 'Thank you screen (Upgrade Now)', 'myStickymenu' );?></option>
212 </select>
213 </div>
214
215 </div>
216 </div>
217
218 <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
219 <label><?php _e('Redirection link', 'myStickymenu'); ?></label>
220 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-action mysticky-welcomebar-redirect" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?> >
221 <input type="text" id="mysticky_welcomebar_redirect" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_redirect]" value="<?php echo esc_url($welcomebar['mysticky_welcomebar_redirect']);?>" placeholder="<?php echo esc_url("https://www.yourdomain.com"); ?>" />
222 </div>
223 </div>
224 <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
225 <label><?php _e( 'Open in a new tab', 'mystickymenu' );?></label>
226 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-newtab mysticky-welcomebar-redirect" >
227 <label class="mysticky-welcomebar-switch">
228 <input name="mysticky_option_welcomebar[mysticky_welcomebar_redirect_newtab]" value= "1" type="checkbox" disabled />
229 <span class="slider"></span>
230 </label>
231 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
232 </div>
233 </div>
234 <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
235 <label><?php _e('rel Attribute', 'myStickymenu'); ?>
236 <span class="mysticky-custom-fields-tooltip">
237 <a href="javascript:void(0);" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a>
238 <p>Add a "rel" attribute to the button link. You can use it to add a rel="nofollow", "sponsored", or any other "rel" attribute option</p>
239 </span>
240 </label>
241 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-newtab mysticky-welcomebar-redirect" >
242 <input type="text" id="mysticky_welcomebar_redirect_rel" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_redirect_rel]" value="" placeholder="" disabled />
243 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
244 </div>
245 </div>
246 <!-- -->
247 <div class="mysticky-welcomebar-setting-content">
248 <label><?php _e('After Submission', 'myStickymenu'); ?></label>
249 <div class="mysticky-welcomebar-setting-content-right">
250 <div class="mysticky-welcomebar-setting-action">
251 <select name="mysticky_option_welcomebar[mysticky_welcomebar_aftersubmission]" class="mysticky-welcomebar-aftersubmission mysticky_welcomebar_disable">
252 <option value="dont_show_welcomebar" <?php selected( @$welcomebar['mysticky_welcomebar_aftersubmission'], 'dont_show_welcomebar' ); ?>><?php _e( "Don't show the Welcome Bar", 'myStickymenu' );?></option>
253 <option value="show_welcomebar_next_visit" <?php selected( @$welcomebar['mysticky_welcomebar_aftersubmission'], 'show_welcomebar_next_visit' ); ?>><?php _e( 'Show the Welcome Bar in the next visit', 'myStickymenu' );?></option>
254 <option value="show_welcomebar_every_page" <?php selected( @$welcomebar['mysticky_welcomebar_aftersubmission'], 'show_welcomebar_every_page' ); ?> ><?php _e( 'Show the Welcome Bar on every page', 'myStickymenu' );?></option>
255 </select>
256 </div>
257 </div>
258 </div>
259 <!-- -->
260 <div class="mysticky-welcomebar-setting-content">
261 <label><?php _e('Close welcome bar Automatically', 'myStickymenu'); ?></label>
262 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-close-automatically-sec">
263 <label for="mysticky-welcomebar-close-automatically-enabled" class="mysticky-welcomebar-switch">
264 <input type="checkbox" id="mysticky-welcomebar-close-automatically-enabled" name="mysticky_option_welcomebar[mysticky_welcomebar_enable_automatical]" value="1" disabled />
265 <span class="slider"></span>
266 </label>
267 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
268 <div class="mysticky-welcomebar-setting-action" style="display:none;">
269 <div class="px-wrap">
270 <span><?php _e('Close welcome bar after ', 'myStickymenu'); ?></span>
271 <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_triggersec_automatically" name="mysticky_option_welcomebar[mysticky_welcomebar_triggersec_automatically]" value="0">
272 <span class="input-px"><?php _e('Sec', 'myStickymenu'); ?></span>
273 </div>
274 </div>
275 </div>
276 </div>
277 </div>
278 <div class="mysticky-welcomebar-setting-block">
279 <div class="mysticky-welcomebar-subheader-title">
280 <h4><?php _e('Display Rules', 'myStickymenu'); ?></h4>
281 </div>
282 <div class="mysticky-welcomebar-setting-content">
283 <label><?php _e('Entry effect', 'myStickymenu'); ?></label>
284 <div class="mysticky-welcomebar-setting-content-right">
285 <?php $welcomebar['mysticky_welcomebar_entry_effect'] = (isset($welcomebar['mysticky_welcomebar_entry_effect']) && $welcomebar['mysticky_welcomebar_entry_effect']!= '') ? $welcomebar['mysticky_welcomebar_entry_effect'] : 'slide-in'; ?>
286 <select id="myStickymenu-entry-effect" name="mysticky_option_welcomebar[mysticky_welcomebar_entry_effect]" >
287 <option value="none" <?php selected( @$welcomebar['mysticky_welcomebar_entry_effect'], 'none' ); ?>><?php _e( 'No effect', 'myStickymenu' );?></option>
288 <option value="slide-in" <?php selected( @$welcomebar['mysticky_welcomebar_entry_effect'], 'slide-in' ); ?>><?php _e( 'Slide in', 'myStickymenu' );?></option>
289 <option value="fade" <?php selected( @$welcomebar['mysticky_welcomebar_entry_effect'], 'fade' ); ?>><?php _e( 'Fade', 'myStickymenu' );?></option>
290 </select>
291 </div>
292 </div>
293 <div class="mysticky-welcomebar-upgrade-main mysticky_device_upgrade">
294 <span class="myStickymenu-upgrade">
295 <a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( ' Upgrade Now', 'mystickymenu' );?></a>
296 </span>
297 <div class="mysticky-welcomebar-setting-content">
298 <label><?php _e('Devices', 'myStickymenu'); ?></label>
299 <div class="mysticky-welcomebar-setting-content-right">
300 <label>
301 <input name="mysticky_option_welcomebar[mysticky_welcomebar_device_desktop]" value= "desktop" type="checkbox" checked disabled />
302 <?php _e( 'Desktop', 'mystickymenu' );?>
303 </label>
304 <label>
305 <input name="mysticky_option_welcomebar[mysticky_welcomebar_device_mobile]" value= "mobile" type="checkbox" checked disabled />
306 <?php _e( 'Mobile', 'mystickymenu' );?>
307 </label>
308 </div>
309 </div>
310 <div class="mysticky-welcomebar-setting-content">
311 <label><?php _e('Trigger', 'myStickymenu'); ?></label>
312 <div class="mysticky-welcomebar-setting-content-right">
313 <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-trigger-wrap">
314 <label>
315 <input type="radio" name="mysticky_option_welcomebar[mysticky_welcomebar_trigger]" value="after_a_few_seconds" checked disabled />&nbsp;<?php _e( 'After a few seconds', 'myStickymenu' );?>
316 </label>
317 <label>
318 <input type="radio" name="mysticky_option_welcomebar[mysticky_welcomebar_trigger]" value="after_scroll" disabled />&nbsp;<?php _e( 'After Scroll', 'myStickymenu' );?>
319 </label>
320 </div>
321 <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-triggersec">
322 <div class="px-wrap">
323 <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_triggersec" name="mysticky_option_welcomebar[mysticky_welcomebar_triggersec]" value="0" disabled />
324 <span class="input-px"><?php echo ( isset($welcomebar['mysticky_welcomebar_trigger']) && $welcomebar['mysticky_welcomebar_trigger'] == 'after_scroll' ) ? '%' : 'Sec'; ?></span>
325 </div>
326 </div>
327 </div>
328 </div>
329 <div class="mysticky-welcomebar-setting-content">
330 <label><?php _e('Expiry date', 'myStickymenu'); ?></label>
331 <div class="mysticky-welcomebar-setting-content-right">
332 <div class="mysticky-welcomebar-expirydate">
333 <input type="text" id="mysticky_welcomebar_expirydate" name="mysticky_option_welcomebar[mysticky_welcomebar_expirydate]" placeholder="<?php _e('No expiry date', 'myStickymenu'); ?>" value="" disabled />
334 <span class="dashicons dashicons-calendar-alt"></span>
335 </div>
336 <div class="mysticky-welcomebar-expirydate-gmt">
337 <select name="mysticky_option_welcomebar[mysticky_welcomebar_expirydate_gmt]" id="mysticky_welcomebar_expirydate_gmt" disabled>
338 <?php for( $i=12; $i>=-12;$i-- ) { ?>
339 <option value="<?php echo $i ?>"><?php echo "GMT " . ( $i>0 ? "+" : "" ).( $i ) ?></option>
340 <?php } ?>
341 </select>
342 </div>
343 </div>
344 </div>
345 <div class="mysticky-welcomebar-setting-content show-on-apper">
346 <label><?php _e('Page targeting', 'myStickymenu'); ?></label>
347 <div class="mysticky-welcomebar-setting-content-right">
348 <a href="javascript:void(0);" class="create-rule" id="create-rule"><?php esc_html_e( "Add Rule", "mystickyelements" );?></a>
349 </div>
350 <?php
351 $url_options = array(
352 'page_contains' => 'pages that contain',
353 'page_has_url' => 'a specific page',
354 'page_start_with' => 'pages starting with',
355 'page_end_with' => 'pages ending with',
356 );
357 ?>
358 <div class="mysticky-welcomebar-page-options-html" style="display: none">
359 <div class="mysticky-welcomebar-page-option">
360 <div class="url-content">
361 <div class="mysticky-welcomebar-url-select">
362 <select name="" id="url_shown_on___count___option">
363 <option value="show_on"><?php esc_html_e("Show on", "mysticky" );?></option>
364 <option value="not_show_on"><?php esc_html_e("Don't show on", "mysticky" );?></option>
365 </select>
366 </div>
367 <div class="mysticky-welcomebar-url-option">
368 <select class="mysticky-welcomebar-url-options" name="" id="url_rules___count___option">
369 <option selected="selected" value=""><?php esc_html_e("Select Rule", "mysticky" );?></option>
370 <?php foreach($url_options as $key=>$value) {
371 echo '<option value="'.$key.'">'.$value.'</option>';
372 } ?>
373 </select>
374 </div>
375 <div class="mysticky-welcomebar-url-box">
376 <span class='mysticky-welcomebar-url'><?php echo site_url("/"); ?></span>
377 </div>
378 <div class="mysticky-welcomebar-url-values">
379 <input type="text" value="" name="mysticky_option_welcomebar[page_settings][__count__][value]" id="url_rules___count___value" disabled />
380 </div>
381 <div class="clear"></div>
382 </div>
383 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
384 </div>
385 </div>
386 <div class="mysticky-welcomebar-page-options mysticky-welcomebar-setting-content-right" id="mysticky-welcomebar-page-options" style="display:none"></div>
387 </div>
388 </div>
389 </div>
390 </div>
391 <div class="mysticky-welcomebar-setting-right">
392 <div class="mysticky-welcomebar-header-title">
393 <h3><?php _e('Preview', 'mystickyelements'); ?></h3>
394 </div>
395 <div class="mysticky-welcomebar-preview-screen">
396 <link href="https://fonts.googleapis.com/css?family=<?php echo $welcomebar['mysticky_welcomebar_font'] ?>:400,600,700|Lato:400,500,600,700" rel="stylesheet" type="text/css" class="sfba-google-font">
397 <div class="mysticky-welcomebar-fixed mysticky-welcomebar-display-desktop <?php echo $display_main_class; ?>" >
398 <div class="mysticky-welcomebar-fixed-wrap">
399 <div class="mysticky-welcomebar-content">
400 <?php echo wpautop(isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase");?>
401 </div>
402 <div class="mysticky-welcomebar-btn">
403 <a href="#" ><?php echo isset($welcomebar['mysticky_welcomebar_btn_text']) ? $welcomebar['mysticky_welcomebar_btn_text'] : "Got it!";?></a>
404 </div>
405 <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a>
406 </div>
407 </div>
408 </div>
409 </div>
410 </div>
411 <div class="mysticky-welcomebar-submit">
412 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save', 'mystickymenu');?>">
413 </div>
414 <input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
415 <input type="hidden" name="active_tab_element" value="1">
416 <input type="hidden" id="save_welcome_bar" name="save_welcome_bar" value="">
417
418 </form>
419 <form class="mysticky-welcomebar-form-reset" method="post" action="#">
420 <div class="mysticky-welcomebar-submit">
421 <input type="submit" name="mysticky_welcomebar_reset" id="reset" class="button button-secondary" value="<?php _e('Reset', 'mystickymenu');?>">
422 </div>
423 <input type="hidden" name="nonce_reset" value="<?php echo $nonce_reset; ?>">
424 <input type="hidden" name="active_tab_element" value="1">
425 </form>
426 <div id="mysticky-welcomebar-save-confirm" style="display:none;" title="<?php esc_attr_e( 'myStickymenu is currently off', 'mystickymenu' ); ?>">
427 <p>
428 <?php _e('Your Welcome Bar is currently turned off, would you like to save and show it on your site?', 'mystickymenu' ); ?>
429 </p>
430 </div>
431 <script>
432 jQuery(".mysticky-welcomebar-fixed").on(
433 "animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd",
434 function() {
435 jQuery(this).removeClass("animation-start");
436 }
437 );
438 jQuery(document).ready(function() {
439 var container = jQuery(".mysticky-welcomebar-fixed");
440 var refreshId = setInterval(function() {
441 container.addClass("animation-start");
442 }, 3500);
443 });
444 </script>
445 <style>
446 .mysticky-welcomebar-fixed {
447 background-color: <?php echo $welcomebar['mysticky_welcomebar_bgcolor'] ?>;
448 font-family: <?php echo $welcomebar['mysticky_welcomebar_font'] ?>;
449 position: absolute;
450 left: 0;
451 right: 0;
452 opacity: 0;
453 z-index: 9999999;
454 -webkit-transition: all 1s ease 0s;
455 -moz-transition: all 1s ease 0s;
456 transition: all 1s ease 0s;
457 }
458 .mysticky-welcomebar-fixed-wrap {
459 min-height: 60px;
460 padding: 20px 10px 20px 10px;
461 display: flex;
462 align-items: center;
463 justify-content: center;
464 }
465 .mysticky-welcomebar-preview-mobile-screen .mysticky-welcomebar-fixed{
466 padding: 0 25px;
467 }
468 .mysticky-welcomebar-position-top {
469 top:0;
470 }
471 .mysticky-welcomebar-position-bottom {
472 bottom:0;
473 }
474 .mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in {
475 top: -80px;
476 }
477 .mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in {
478 bottom: -80px;
479 }
480 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in.entry-effect {
481 top:0;
482 opacity: 1;
483 }
484 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in.entry-effect {
485 bottom:0;
486 opacity: 1;
487 }
488 .mysticky-welcomebar-entry-effect-fade {
489 opacity: 0;
490 }
491 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-entry-effect-fade.entry-effect {
492 opacity: 1;
493 }
494 .mysticky-welcomebar-entry-effect-none {
495 display: none;
496 }
497 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-entry-effect-none.entry-effect {
498 display: block;
499 opacity: 1;
500 }
501 .mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed {
502 top: 0;
503 }
504 .mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed {
505 bottom: 0;
506 }
507 .mysticky-welcomebar-fixed .mysticky-welcomebar-content p a,
508 .mysticky-welcomebar-fixed .mysticky-welcomebar-content p {
509 color: <?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'] ?>;
510 font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px;
511 font-family: inherit;
512 margin: 0;
513 padding: 0;
514 line-height: 1.2;
515 font-weight: 400;
516 }
517 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn {
518 padding-left: 30px;
519 display: none;
520 }
521 .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn {
522 display: block;
523 }
524 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a {
525 background-color: <?php echo $welcomebar['mysticky_welcomebar_btncolor'] ?>;
526 font-family: inherit;
527 color: <?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'] ?>;
528 border-radius: 4px;
529 text-decoration: none;
530 display: inline-block;
531 vertical-align: top;
532 line-height: 1.2;
533 font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px;
534 font-weight: 400;
535 padding: 5px 20px;
536 white-space: nowrap;
537 }
538 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a:hover {
539 /*opacity: 0.7;*/
540 -moz-box-shadow: 1px 2px 4px rgba(0, 0, 0,0.5);
541 -webkit-box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
542 box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
543 }
544 .mysticky-welcomebar-fixed .mysticky-welcomebar-close {
545 display: none;
546 vertical-align: top;
547 width: 20px;
548 height: 20px;
549 text-align: center;
550 text-decoration: none;
551 line-height: 20px;
552 border-radius: 5px;
553 color: #000;
554 position: absolute;
555 font-family: Lato;
556 top: 5px;
557 right: 5px;
558 text-shadow: 0 0 0px #fff;
559 -webkit-transition: all 0.5s ease 0s;
560 -moz-transition: all 0.5s ease 0s;
561 transition: all 0.5s ease 0s;
562 -webkit-transform-origin: 50% 50%;
563 -moz-transform-origin: 50% 50%;
564 transform-origin: 50% 50%;
565 }
566 .mysticky-welcomebar-fixed .mysticky-welcomebar-close:hover {
567 opacity: 1;
568 -webkit-transform: rotate(180deg);
569 -moz-transform: rotate(180deg);
570 transform: rotate(180deg);
571 }
572 .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close {
573 display: inline-block;
574 }
575 @media only screen and (max-width: 1024px) {
576 .mysticky-welcomebar-fixed {
577 padding: 0 10px 0 10px;
578 }
579 .mysticky-welcomebar-fixed .mysticky-welcomebar-close {
580 width: 20px;
581 height: 20px;
582 line-height: 20px;
583 right: 0px;
584 }
585 }
586
587 /* Animated Buttons */
588 .mysticky-welcomebar-btn a {
589 -webkit-animation-duration: 1s;
590 animation-duration: 1s;
591 }
592 @-webkit-keyframes flash {
593 from,
594 50%,
595 to {
596 opacity: 1;
597 }
598
599 25%,
600 75% {
601 opacity: 0;
602 }
603 }
604 @keyframes flash {
605 from,
606 50%,
607 to {
608 opacity: 1;
609 }
610
611 25%,
612 75% {
613 opacity: 0;
614 }
615 }
616 .mysticky-welcomebar-attention-flash.animation-start .mysticky-welcomebar-btn a {
617 -webkit-animation-name: flash;
618 animation-name: flash;
619 }
620
621 @keyframes shake {
622 from,
623 to {
624 -webkit-transform: translate3d(0, 0, 0);
625 transform: translate3d(0, 0, 0);
626 }
627
628 10%,
629 30%,
630 50%,
631 70%,
632 90% {
633 -webkit-transform: translate3d(-10px, 0, 0);
634 transform: translate3d(-10px, 0, 0);
635 }
636
637 20%,
638 40%,
639 60%,
640 80% {
641 -webkit-transform: translate3d(10px, 0, 0);
642 transform: translate3d(10px, 0, 0);
643 }
644 }
645
646 .mysticky-welcomebar-attention-shake.animation-start .mysticky-welcomebar-btn a {
647 -webkit-animation-name: shake;
648 animation-name: shake;
649 }
650
651 @-webkit-keyframes swing {
652 20% {
653 -webkit-transform: rotate3d(0, 0, 1, 15deg);
654 transform: rotate3d(0, 0, 1, 15deg);
655 }
656
657 40% {
658 -webkit-transform: rotate3d(0, 0, 1, -10deg);
659 transform: rotate3d(0, 0, 1, -10deg);
660 }
661
662 60% {
663 -webkit-transform: rotate3d(0, 0, 1, 5deg);
664 transform: rotate3d(0, 0, 1, 5deg);
665 }
666
667 80% {
668 -webkit-transform: rotate3d(0, 0, 1, -5deg);
669 transform: rotate3d(0, 0, 1, -5deg);
670 }
671
672 to {
673 -webkit-transform: rotate3d(0, 0, 1, 0deg);
674 transform: rotate3d(0, 0, 1, 0deg);
675 }
676 }
677
678 @keyframes swing {
679 20% {
680 -webkit-transform: rotate3d(0, 0, 1, 15deg);
681 transform: rotate3d(0, 0, 1, 15deg);
682 }
683
684 40% {
685 -webkit-transform: rotate3d(0, 0, 1, -10deg);
686 transform: rotate3d(0, 0, 1, -10deg);
687 }
688
689 60% {
690 -webkit-transform: rotate3d(0, 0, 1, 5deg);
691 transform: rotate3d(0, 0, 1, 5deg);
692 }
693
694 80% {
695 -webkit-transform: rotate3d(0, 0, 1, -5deg);
696 transform: rotate3d(0, 0, 1, -5deg);
697 }
698
699 to {
700 -webkit-transform: rotate3d(0, 0, 1, 0deg);
701 transform: rotate3d(0, 0, 1, 0deg);
702 }
703 }
704
705 .mysticky-welcomebar-attention-swing.animation-start .mysticky-welcomebar-btn a {
706 -webkit-transform-origin: top center;
707 transform-origin: top center;
708 -webkit-animation-name: swing;
709 animation-name: swing;
710 }
711
712 @-webkit-keyframes tada {
713 from {
714 -webkit-transform: scale3d(1, 1, 1);
715 transform: scale3d(1, 1, 1);
716 }
717
718 10%,
719 20% {
720 -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
721 transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
722 }
723
724 30%,
725 50%,
726 70%,
727 90% {
728 -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
729 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
730 }
731
732 40%,
733 60%,
734 80% {
735 -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
736 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
737 }
738
739 to {
740 -webkit-transform: scale3d(1, 1, 1);
741 transform: scale3d(1, 1, 1);
742 }
743 }
744
745 @keyframes tada {
746 from {
747 -webkit-transform: scale3d(1, 1, 1);
748 transform: scale3d(1, 1, 1);
749 }
750
751 10%,
752 20% {
753 -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
754 transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
755 }
756
757 30%,
758 50%,
759 70%,
760 90% {
761 -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
762 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
763 }
764
765 40%,
766 60%,
767 80% {
768 -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
769 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
770 }
771
772 to {
773 -webkit-transform: scale3d(1, 1, 1);
774 transform: scale3d(1, 1, 1);
775 }
776 }
777
778 .mysticky-welcomebar-attention-tada.animation-start .mysticky-welcomebar-btn a {
779 -webkit-animation-name: tada;
780 animation-name: tada;
781 }
782
783 @-webkit-keyframes heartBeat {
784 0% {
785 -webkit-transform: scale(1);
786 transform: scale(1);
787 }
788
789 14% {
790 -webkit-transform: scale(1.3);
791 transform: scale(1.3);
792 }
793
794 28% {
795 -webkit-transform: scale(1);
796 transform: scale(1);
797 }
798
799 42% {
800 -webkit-transform: scale(1.3);
801 transform: scale(1.3);
802 }
803
804 70% {
805 -webkit-transform: scale(1);
806 transform: scale(1);
807 }
808 }
809
810 @keyframes heartBeat {
811 0% {
812 -webkit-transform: scale(1);
813 transform: scale(1);
814 }
815
816 14% {
817 -webkit-transform: scale(1.3);
818 transform: scale(1.3);
819 }
820
821 28% {
822 -webkit-transform: scale(1);
823 transform: scale(1);
824 }
825
826 42% {
827 -webkit-transform: scale(1.3);
828 transform: scale(1.3);
829 }
830
831 70% {
832 -webkit-transform: scale(1);
833 transform: scale(1);
834 }
835 }
836
837 .mysticky-welcomebar-attention-heartbeat.animation-start .mysticky-welcomebar-btn a {
838 -webkit-animation-name: heartBeat;
839 animation-name: heartBeat;
840 -webkit-animation-duration: 1.3s;
841 animation-duration: 1.3s;
842 -webkit-animation-timing-function: ease-in-out;
843 animation-timing-function: ease-in-out;
844 }
845
846 @-webkit-keyframes wobble {
847 from {
848 -webkit-transform: translate3d(0, 0, 0);
849 transform: translate3d(0, 0, 0);
850 }
851
852 15% {
853 -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
854 transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
855 }
856
857 30% {
858 -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
859 transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
860 }
861
862 45% {
863 -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
864 transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
865 }
866
867 60% {
868 -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
869 transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
870 }
871
872 75% {
873 -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
874 transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
875 }
876
877 to {
878 -webkit-transform: translate3d(0, 0, 0);
879 transform: translate3d(0, 0, 0);
880 }
881 }
882
883 @keyframes wobble {
884 from {
885 -webkit-transform: translate3d(0, 0, 0);
886 transform: translate3d(0, 0, 0);
887 }
888
889 15% {
890 -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
891 transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
892 }
893
894 30% {
895 -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
896 transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
897 }
898
899 45% {
900 -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
901 transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
902 }
903
904 60% {
905 -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
906 transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
907 }
908
909 75% {
910 -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
911 transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
912 }
913
914 to {
915 -webkit-transform: translate3d(0, 0, 0);
916 transform: translate3d(0, 0, 0);
917 }
918 }
919
920 .mysticky-welcomebar-attention-wobble.animation-start .mysticky-welcomebar-btn a {
921 -webkit-animation-name: wobble;
922 animation-name: wobble;
923 }
924 </style>
925
926 <?php
927 }
928
929 function mysticky_welcomebar_pro_widget_default_fields() {
930 return array(
931 'mysticky_welcomebar_position' => 'top',
932 'mysticky_welcomebar_height' => '60',
933 'mysticky_welcomebar_bgcolor' => '#03ed96',
934 'mysticky_welcomebar_bgtxtcolor' => '#000000',
935 'mysticky_welcomebar_font' => 'Poppins',
936 'mysticky_welcomebar_fontsize' => '16',
937 'mysticky_welcomebar_bar_text' => 'Get 30% off your first purchase',
938 'mysticky_welcomebar_x_desktop' => 'desktop',
939 'mysticky_welcomebar_x_mobile' => 'mobile',
940 'mysticky_welcomebar_btn_desktop' => 'desktop',
941 'mysticky_welcomebar_btn_mobile' => 'mobile',
942 'mysticky_welcomebar_btncolor' => '#000000',
943 'mysticky_welcomebar_btntxtcolor' => '#ffffff',
944 'mysticky_welcomebar_btn_text' => 'Got it!',
945 'mysticky_welcomebar_actionselect' => 'close_bar',
946 'mysticky_welcomebar_aftersubmission' => 'dont_show_welcomebar',
947 'mysticky_welcomebar_redirect' => 'https://www.yourdomain.com',
948 'mysticky_welcomebar_redirect_newtab' => '',
949 'mysticky_welcomebar_redirect_rel' => '',
950 'mysticky_welcomebar_device_desktop' => 'desktop',
951 'mysticky_welcomebar_device_mobile' => 'mobile',
952 'mysticky_welcomebar_entry_effect' => 'slide-in',
953 'mysticky_welcomebar_trigger' => 'after_a_few_seconds',
954 'mysticky_welcomebar_triggersec' => '0',
955 'mysticky_welcomebar_expirydate' => '',
956 'mysticky_welcomebar_page_settings' => '',
957 );
958 }
959
960 function mysticky_welcome_bar_frontend(){
961 $welcomebar = get_option( 'mysticky_option_welcomebar' );
962
963 if ( ( isset($welcomebar['mysticky_welcomebar_expirydate']) && $welcomebar['mysticky_welcomebar_expirydate'] !='' && strtotime( date('m/d/Y')) > strtotime($welcomebar['mysticky_welcomebar_expirydate']) ) || !isset($welcomebar['mysticky_welcomebar_enable'] ) ) {
964 return;
965 }
966 $mysticky_welcomebar_showx_desktop = $mysticky_welcomebar_showx_mobile = '';
967 $mysticky_welcomebar_btn_desktop = $mysticky_welcomebar_btn_mobile = '';
968 $mysticky_welcomebar_display_desktop = $mysticky_welcomebar_display_mobile = '';
969 if( isset($welcomebar['mysticky_welcomebar_x_desktop']) ) {
970 $mysticky_welcomebar_showx_desktop = ' mysticky-welcomebar-showx-desktop';
971 }
972 if( isset($welcomebar['mysticky_welcomebar_x_mobile']) ) {
973 $mysticky_welcomebar_showx_mobile = ' mysticky-welcomebar-showx-mobile';
974 }
975 if( isset($welcomebar['mysticky_welcomebar_btn_desktop']) ) {
976 $mysticky_welcomebar_btn_desktop = ' mysticky-welcomebar-btn-desktop';
977 }
978 if( isset($welcomebar['mysticky_welcomebar_btn_mobile']) ) {
979 $mysticky_welcomebar_btn_mobile = ' mysticky-welcomebar-btn-mobile';
980 }
981 $display = ' mysticky-welcomebar-attention-'.$welcomebar['mysticky_welcomebar_attentionselect'];
982 $display_entry_effect = (isset($welcomebar['mysticky_welcomebar_entry_effect'])) ? ' mysticky-welcomebar-entry-effect-'.$welcomebar['mysticky_welcomebar_entry_effect'] : ' mysticky-welcomebar-entry-effect-slide-in';
983 $mysticky_welcomebar_display_desktop = ' mysticky-welcomebar-display-desktop';
984 $mysticky_welcomebar_display_mobile = ' mysticky-welcomebar-display-mobile';
985
986 $display_main_class = "mysticky-welcomebar-position-" . $welcomebar['mysticky_welcomebar_position'] . $mysticky_welcomebar_showx_desktop . $mysticky_welcomebar_showx_mobile . $mysticky_welcomebar_btn_desktop . $mysticky_welcomebar_btn_mobile . $mysticky_welcomebar_display_desktop . $mysticky_welcomebar_display_mobile .$display . $display_entry_effect;
987
988 if( isset($welcomebar['mysticky_welcomebar_actionselect']) ) {
989 if( $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' ) {
990 $mysticky_welcomebar_actionselect_url = esc_url( $welcomebar['mysticky_welcomebar_redirect'] );
991 } else {
992 $mysticky_welcomebar_actionselect_url = 'javascript:void(0)';
993 }
994 }
995 /*if( isset($welcomebar['mysticky_welcomebar_enable']) ) {
996 if ( $welcomebar['mysticky_welcomebar_position'] == 'top' ) {
997 $welcomebar_enable_block = "top: -60px";
998 } else {
999 $welcomebar_enable_block = "bottom: -60px";
1000 }
1001 }*/
1002
1003 ?>
1004 <div class="mysticky-welcomebar-fixed <?php echo $display_main_class; ?>" style="<?php //echo $welcomebar_enable_block; ?>" data-after-triger="after_a_few_seconds" data-triger-sec="0" data-position="<?php echo esc_attr($welcomebar['mysticky_welcomebar_position']);?>" data-height="<?php echo esc_attr($welcomebar['mysticky_welcomebar_height']);?>" data-rediect="<?php echo esc_attr($welcomebar['mysticky_welcomebar_actionselect']);?>" data-aftersubmission="<?php echo esc_attr($welcomebar['mysticky_welcomebar_aftersubmission']);?>">
1005 <div class="mysticky-welcomebar-fixed-wrap">
1006 <div class="mysticky-welcomebar-content">
1007 <?php echo wpautop( isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase" );?>
1008 </div>
1009 <div class="mysticky-welcomebar-btn">
1010 <a href="<?php echo $mysticky_welcomebar_actionselect_url; ?>" <?php if( isset($welcomebar['mysticky_welcomebar_redirect_newtab']) && $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' && $welcomebar['mysticky_welcomebar_redirect_newtab']== 1):?> target="_blank" <?php endif;?>><?php echo isset($welcomebar['mysticky_welcomebar_btn_text'])?$welcomebar['mysticky_welcomebar_btn_text']:"Got it!";?></a>
1011 </div>
1012 <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a>
1013 </div>
1014 </div>
1015 <script>
1016
1017 jQuery(document).ready(function($){
1018 var mysticky_welcomebar_height = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
1019 if( jQuery( '.mysticky-welcomebar-fixed' ).data('position') == 'top' ) {
1020 jQuery( '.mysticky-welcomebar-entry-effect-slide-in.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' );
1021 } else {
1022 jQuery( '.mysticky-welcomebar-entry-effect-slide-in.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
1023 }
1024 var divi_topbar_height = $( '.et_fixed_nav #top-header' ).outerHeight();
1025 var divi_total_height = mysticky_welcomebar_height + divi_topbar_height;
1026 var welcombar_aftersubmission = $( '.mysticky-welcomebar-fixed' ).data('aftersubmission');
1027 if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
1028 var welcomebar_storage = localStorage.getItem("welcomebar_close");
1029 } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
1030 var welcomebar_storage = sessionStorage.getItem("welcomebar_close");
1031 } else {
1032 sessionStorage.removeItem('welcomebar_close');
1033 localStorage.removeItem('welcomebar_close');
1034 var welcomebar_storage = null;
1035 }
1036 if ( welcomebar_storage === null ){
1037
1038 var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
1039
1040 jQuery( 'body' ).addClass( 'mysticky-welcomebar-apper' );
1041
1042 if ( after_trigger == 'after_a_few_seconds' ) {
1043
1044 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
1045 if ( $( window ).width() > 767 ) {
1046 var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
1047 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1048 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
1049
1050 setTimeout(function(){
1051 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1052 $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
1053 if ( welcombar_position == 'top' ) {
1054 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1055 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1056 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1057 $( 'html' ).css( 'margin-bottom', '' );
1058 jQuery( '#mysticky_divi_style' ).remove();
1059 jQuery( '.et_fixed_nav #top-header' ).css( 'top', welcombar_height + 'px' );
1060 jQuery( 'head' ).append( '<style id="mysticky_divi_style" type="text/css">.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>' );
1061 $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
1062 $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1063 } else {
1064 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
1065 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1066 $( 'html' ).css( 'margin-top', '' );
1067 jQuery( '#mysticky_divi_style' ).remove();
1068 jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1069 $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
1070 }
1071 }, trigger_sec );
1072 }
1073 }
1074 }
1075 if ( $( window ).width() < 767 ) {
1076 if ( after_trigger == 'after_a_few_seconds' ) {
1077 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
1078 var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
1079 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1080 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
1081 setTimeout(function(){
1082 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1083 $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
1084 jQuery( '#mysticky_divi_style' ).remove();
1085 jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1086 if ( welcombar_position == 'top' ) {
1087 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1088 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1089 $( 'html' ).css( 'margin-bottom', '' );
1090 $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
1091 $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1092 } else {
1093 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
1094 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1095 $( 'html' ).css( 'margin-top', '' );
1096 $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
1097 }
1098 }, trigger_sec );
1099 }
1100 }
1101 }
1102 mystickyelements_present();
1103 }
1104 $( window ).resize( function(){
1105 var mysticky_welcomebar_height = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
1106 if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
1107 var welcomebar_storage = localStorage.getItem("welcomebar_close");
1108 } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
1109 var welcomebar_storage = sessionStorage.getItem("welcomebar_close");
1110 } else {
1111 sessionStorage.removeItem('welcomebar_close');
1112 localStorage.removeItem('welcomebar_close');
1113 var welcomebar_storage = null;
1114 }
1115 if ( welcomebar_storage === null ){
1116 var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
1117 if ( ! $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-notapper' ) ) {
1118 jQuery( 'body' ).addClass( 'mysticky-welcomebar-apper' );
1119 } else {
1120 jQuery( 'body' ).removeClass( 'mysticky-welcomebar-apper' );
1121 }
1122 if ( after_trigger == 'after_a_few_seconds' ) {
1123 var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
1124 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1125 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
1126 if ( $( window ).width() < 767 ) {
1127 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
1128 setTimeout(function(){
1129 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1130 $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
1131 jQuery( '#mysticky_divi_style' ).remove();
1132 jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1133 if ( welcombar_position == 'top' ) {
1134 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1135 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1136 $( 'html' ).css( 'margin-bottom', '' );
1137 $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
1138 $( '.mysticky-welcomebar-apper #mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1139 } else {
1140 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
1141 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1142 $( 'html' ).css( 'margin-top', '' );
1143 $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
1144 }
1145 }, trigger_sec );
1146 }
1147 } else {
1148 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
1149 setTimeout(function(){
1150 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1151 $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
1152 if ( welcombar_position == 'top' ) {
1153 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1154 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1155 $( 'html' ).css( 'margin-bottom', '' );
1156 jQuery( '#mysticky_divi_style' ).remove();
1157 jQuery( '.mysticky-welcomebar-apper.et_fixed_nav #top-header' ).css( 'top', welcombar_height + 'px' );
1158 jQuery( 'head' ).append( '<style id="mysticky_divi_style" type="text/css">.mysticky-welcomebar-apper.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.mysticky-welcomebar-apper.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>' );
1159 $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
1160 $( '.mysticky-welcomebar-apper #mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1161 } else {
1162 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
1163 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1164 $( 'html' ).css( 'margin-top', '' );
1165 jQuery( '#mysticky_divi_style' ).remove();
1166 jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1167 $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
1168 }
1169 }, trigger_sec );
1170 }
1171 }
1172 }
1173 mystickyelements_present();
1174 }
1175 } );
1176
1177 jQuery(window).scroll(function(){
1178 if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
1179 var welcomebar_storage = localStorage.getItem("welcomebar_close");
1180 } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
1181 var welcomebar_storage = sessionStorage.getItem("welcomebar_close");
1182 } else {
1183 sessionStorage.removeItem('welcomebar_close');
1184 localStorage.removeItem('welcomebar_close');
1185 var welcomebar_storage = null;
1186 }
1187 if ( welcomebar_storage === null ){
1188 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
1189 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1190 if ( welcombar_position == 'top' ) {
1191 $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1192 }
1193 if ( after_trigger === 'after_scroll' ) {
1194 var scroll = 100 * $(window).scrollTop() / ($(document).height() - $(window).height());
1195 var after_scroll_val = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec');
1196 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1197 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
1198 if( scroll > after_scroll_val ) {
1199 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
1200 if ( $( window ).width() > 767 ) {
1201 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1202 $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
1203 if ( welcombar_position == 'top' ) {
1204 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1205 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1206 $( 'html' ).css( 'margin-bottom', '' );
1207 $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
1208 $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1209 } else {
1210 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
1211 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1212 $( 'html' ).css( 'margin-top', '' );
1213 $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
1214 }
1215 }
1216 }
1217 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
1218 if ( $( window ).width() < 767 ) {
1219 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
1220 $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
1221 if ( welcombar_position == 'top' ) {
1222 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
1223 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1224 $( 'html' ).css( 'margin-bottom', '' );
1225 $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
1226 $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
1227 } else {
1228 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
1229 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
1230 $( 'html' ).css( 'margin-top', '' );
1231 $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
1232 }
1233 }
1234 }
1235 }
1236 }
1237 mystickyelements_present();
1238 }
1239
1240 });
1241
1242 jQuery( '.mysticky-welcomebar-close, .mysticky-welcomebar-btn a' ).on( 'click', function(){
1243 if( welcombar_aftersubmission != 'show_welcomebar_every_page' ){
1244 if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
1245 sessionStorage.removeItem('welcomebar_close');
1246 localStorage.setItem('welcomebar_close', 'close');
1247 } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
1248 localStorage.removeItem('welcomebar_close');
1249 sessionStorage.setItem('welcomebar_close', 'close');
1250 }
1251 }
1252 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
1253 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
1254 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-notapper' );
1255 jQuery( 'body' ).removeClass( 'mysticky-welcomebar-apper' );
1256 jQuery( '.mysticky-welcomebar-fixed' ).slideUp( 'slow' );
1257 if ( welcombar_position == 'top' ) {
1258 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' );
1259 } else {
1260 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
1261 }
1262 jQuery( '#mysticky_divi_style' ).remove();
1263 jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
1264 jQuery( 'html' ).css( 'margin-top', '' );
1265 jQuery( 'html' ).css( 'margin-bottom', '' );
1266 $( '#mysticky-nav' ).css( 'top', '0px' );
1267 /*if mystickyelements show*/
1268 var mystickyelements_show = $( '.mystickyelements-fixed' ).length;
1269 if( mystickyelements_show && $( window ).width() <= 1024 && $( '.mystickyelements-fixed' ).hasClass( 'mystickyelements-position-mobile-top' ) && welcombar_position == 'top' ) {
1270 var mystickyelements_height = $( '.mystickyelements-fixed' ).height();
1271 $( '.mystickyelements-fixed' ).css( 'top', '' );
1272 $( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_height + 'px !important' );
1273 }
1274 } );
1275 });
1276 function mystickyelements_present() {
1277 var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
1278 var mystickyelements_show = jQuery( '.mystickyelements-fixed' ).length;
1279 if( mystickyelements_show ) {
1280 var welcombar_position = jQuery( '.mysticky-welcomebar-fixed' ).data('position');
1281 var welcombar_height = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
1282 var mystickyelements_height = jQuery( '.mystickyelements-fixed' ).height();
1283 var mystickyelements_total_height = welcombar_height + mystickyelements_height;
1284 if ( jQuery( window ).width() <= 1024 && jQuery( '.mystickyelements-fixed' ).hasClass( 'mystickyelements-position-mobile-top' ) ) {
1285 if ( after_trigger == 'after_a_few_seconds' ) {
1286 if ( jQuery( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
1287 var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
1288 setTimeout(function(){
1289 if ( welcombar_position == 'top' ) {
1290 jQuery( '.mystickyelements-fixed' ).css( 'top', welcombar_height );
1291 jQuery( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_total_height + 'px !important' );
1292 } else {
1293 jQuery( '.mystickyelements-fixed' ).css( 'top', '' );
1294 jQuery( 'html' ).attr( 'style', 'margin-bottom: ' + welcombar_height + 'px !important' );
1295 }
1296 }, trigger_sec );
1297 }
1298 } else if ( after_trigger === 'after_scroll' ) {
1299 var scroll = 100 * $(window).scrollTop() / ($(document).height() - $(window).height());
1300 var after_scroll_val = $( '.mysticky-welcomebar-fixed' ).data('triger-sec');
1301 if( scroll > after_scroll_val ) {
1302 if ( jQuery( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
1303 if ( welcombar_position == 'top' ) {
1304 jQuery( '.mystickyelements-fixed' ).css( 'top', welcombar_height );
1305 jQuery( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_total_height + 'px !important' );
1306 } else {
1307 jQuery( '.mystickyelements-fixed' ).css( 'top', '' );
1308 jQuery( 'html' ).attr( 'style', 'margin-bottom: ' + welcombar_height + 'px !important' );
1309 }
1310 }
1311 }
1312 }
1313 }
1314 }
1315 }
1316 jQuery(".mysticky-welcomebar-fixed").on(
1317 "animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd",
1318 function() {
1319 jQuery(this).removeClass("animation-start");
1320 }
1321 );
1322 jQuery(document).ready(function() {
1323 var container = jQuery(".mysticky-welcomebar-fixed");
1324 var refreshId = setInterval(function() {
1325 container.addClass("animation-start");
1326 }, 3500);
1327 });
1328
1329 </script>
1330 <style>
1331 .mysticky-welcomebar-fixed , .mysticky-welcomebar-fixed * {
1332 -webkit-box-sizing: border-box;
1333 -moz-box-sizing: border-box;
1334 box-sizing: border-box;
1335 }
1336 .mysticky-welcomebar-fixed {
1337 background-color: <?php echo $welcomebar['mysticky_welcomebar_bgcolor'] ?>;
1338 font-family: <?php echo $welcomebar['mysticky_welcomebar_font'] ?>;
1339 position: fixed;
1340 left: 0;
1341 right: 0;
1342 z-index: 9999999;
1343 opacity: 0;
1344 }
1345 .mysticky-welcomebar-fixed-wrap {
1346 min-height: 60px;
1347 padding: 20px 50px;
1348 display: flex;
1349 align-items: center;
1350 justify-content: center;
1351 width: 100%;
1352 height: 100%;
1353 }
1354 .mysticky-welcomebar-animation {
1355 -webkit-transition: all 1s ease 0s;
1356 -moz-transition: all 1s ease 0s;
1357 transition: all 1s ease 0s;
1358 }
1359 .mysticky-welcomebar-position-top {
1360 top:0;
1361 }
1362 .mysticky-welcomebar-position-bottom {
1363 bottom:0;
1364 }
1365 .mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in {
1366 top: -60px;
1367 }
1368 .mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in {
1369 bottom: -60px;
1370 }
1371 .mysticky-welcomebar-entry-effect-fade {
1372 opacity: 0;
1373 }
1374 .mysticky-welcomebar-entry-effect-none {
1375 display: none;
1376 }
1377 .mysticky-welcomebar-fixed .mysticky-welcomebar-content p a,
1378 .mysticky-welcomebar-fixed .mysticky-welcomebar-content p {
1379 color: <?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'] ?>;
1380 font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px;
1381 margin: 0;
1382 padding: 0;
1383 line-height: 1.2;
1384 font-family: inherit;
1385 font-weight: 400;
1386 }
1387 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn {
1388 padding-left: 30px;
1389 display: none;
1390 line-height: 1;
1391 }
1392 .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn {
1393 display: block;
1394 }
1395 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a {
1396 background-color: <?php echo $welcomebar['mysticky_welcomebar_btncolor'] ?>;
1397 font-family: inherit;
1398 color: <?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'] ?>;
1399 border-radius: 4px;
1400 text-decoration: none;
1401 display: inline-block;
1402 vertical-align: top;
1403 line-height: 1.2;
1404 font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px;
1405 font-weight: 400;
1406 padding: 5px 20px;
1407 white-space: nowrap;
1408 }
1409 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a:hover {
1410 /*opacity: 0.7;*/
1411 -moz-box-shadow: 1px 2px 4px rgba(0, 0, 0,0.5);
1412 -webkit-box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
1413 box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
1414 }
1415 .mysticky-welcomebar-fixed .mysticky-welcomebar-close {
1416 display: none;
1417 vertical-align: top;
1418 width: 30px;
1419 height: 30px;
1420 text-align: center;
1421 line-height: 30px;
1422 border-radius: 5px;
1423 color: #000;
1424 position: absolute;
1425 top: 5px;
1426 right: 10px;
1427 outline: none;
1428 font-family: Lato;
1429 text-decoration: none;
1430 text-shadow: 0 0 0px #fff;
1431 -webkit-transition: all 0.5s ease 0s;
1432 -moz-transition: all 0.5s ease 0s;
1433 transition: all 0.5s ease 0s;
1434 -webkit-transform-origin: 50% 50%;
1435 -moz-transform-origin: 50% 50%;
1436 transform-origin: 50% 50%;
1437 }
1438 .mysticky-welcomebar-fixed .mysticky-welcomebar-close:hover {
1439 opacity: 1;
1440 -webkit-transform: rotate(180deg);
1441 -moz-transform: rotate(180deg);
1442 transform: rotate(180deg);
1443 }
1444 .mysticky-welcomebar-fixed .mysticky-welcomebar-close span.dashicons {
1445 font-size: 27px;
1446 }
1447 .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close {
1448 display: inline-block;
1449 }
1450
1451 /* Animated Buttons */
1452 .mysticky-welcomebar-btn a {
1453 -webkit-animation-duration: 1s;
1454 animation-duration: 1s;
1455 }
1456 @-webkit-keyframes flash {
1457 from,
1458 50%,
1459 to {
1460 opacity: 1;
1461 }
1462
1463 25%,
1464 75% {
1465 opacity: 0;
1466 }
1467 }
1468 @keyframes flash {
1469 from,
1470 50%,
1471 to {
1472 opacity: 1;
1473 }
1474
1475 25%,
1476 75% {
1477 opacity: 0;
1478 }
1479 }
1480 .mysticky-welcomebar-attention-flash.animation-start .mysticky-welcomebar-btn a {
1481 -webkit-animation-name: flash;
1482 animation-name: flash;
1483 }
1484
1485 @keyframes shake {
1486 from,
1487 to {
1488 -webkit-transform: translate3d(0, 0, 0);
1489 transform: translate3d(0, 0, 0);
1490 }
1491
1492 10%,
1493 30%,
1494 50%,
1495 70%,
1496 90% {
1497 -webkit-transform: translate3d(-10px, 0, 0);
1498 transform: translate3d(-10px, 0, 0);
1499 }
1500
1501 20%,
1502 40%,
1503 60%,
1504 80% {
1505 -webkit-transform: translate3d(10px, 0, 0);
1506 transform: translate3d(10px, 0, 0);
1507 }
1508 }
1509
1510 .mysticky-welcomebar-attention-shake.animation-start .mysticky-welcomebar-btn a {
1511 -webkit-animation-name: shake;
1512 animation-name: shake;
1513 }
1514
1515 @-webkit-keyframes swing {
1516 20% {
1517 -webkit-transform: rotate3d(0, 0, 1, 15deg);
1518 transform: rotate3d(0, 0, 1, 15deg);
1519 }
1520
1521 40% {
1522 -webkit-transform: rotate3d(0, 0, 1, -10deg);
1523 transform: rotate3d(0, 0, 1, -10deg);
1524 }
1525
1526 60% {
1527 -webkit-transform: rotate3d(0, 0, 1, 5deg);
1528 transform: rotate3d(0, 0, 1, 5deg);
1529 }
1530
1531 80% {
1532 -webkit-transform: rotate3d(0, 0, 1, -5deg);
1533 transform: rotate3d(0, 0, 1, -5deg);
1534 }
1535
1536 to {
1537 -webkit-transform: rotate3d(0, 0, 1, 0deg);
1538 transform: rotate3d(0, 0, 1, 0deg);
1539 }
1540 }
1541
1542 @keyframes swing {
1543 20% {
1544 -webkit-transform: rotate3d(0, 0, 1, 15deg);
1545 transform: rotate3d(0, 0, 1, 15deg);
1546 }
1547
1548 40% {
1549 -webkit-transform: rotate3d(0, 0, 1, -10deg);
1550 transform: rotate3d(0, 0, 1, -10deg);
1551 }
1552
1553 60% {
1554 -webkit-transform: rotate3d(0, 0, 1, 5deg);
1555 transform: rotate3d(0, 0, 1, 5deg);
1556 }
1557
1558 80% {
1559 -webkit-transform: rotate3d(0, 0, 1, -5deg);
1560 transform: rotate3d(0, 0, 1, -5deg);
1561 }
1562
1563 to {
1564 -webkit-transform: rotate3d(0, 0, 1, 0deg);
1565 transform: rotate3d(0, 0, 1, 0deg);
1566 }
1567 }
1568
1569 .mysticky-welcomebar-attention-swing.animation-start .mysticky-welcomebar-btn a {
1570 -webkit-transform-origin: top center;
1571 transform-origin: top center;
1572 -webkit-animation-name: swing;
1573 animation-name: swing;
1574 }
1575
1576 @-webkit-keyframes tada {
1577 from {
1578 -webkit-transform: scale3d(1, 1, 1);
1579 transform: scale3d(1, 1, 1);
1580 }
1581
1582 10%,
1583 20% {
1584 -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
1585 transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
1586 }
1587
1588 30%,
1589 50%,
1590 70%,
1591 90% {
1592 -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
1593 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
1594 }
1595
1596 40%,
1597 60%,
1598 80% {
1599 -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
1600 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
1601 }
1602
1603 to {
1604 -webkit-transform: scale3d(1, 1, 1);
1605 transform: scale3d(1, 1, 1);
1606 }
1607 }
1608
1609 @keyframes tada {
1610 from {
1611 -webkit-transform: scale3d(1, 1, 1);
1612 transform: scale3d(1, 1, 1);
1613 }
1614
1615 10%,
1616 20% {
1617 -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
1618 transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
1619 }
1620
1621 30%,
1622 50%,
1623 70%,
1624 90% {
1625 -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
1626 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
1627 }
1628
1629 40%,
1630 60%,
1631 80% {
1632 -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
1633 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
1634 }
1635
1636 to {
1637 -webkit-transform: scale3d(1, 1, 1);
1638 transform: scale3d(1, 1, 1);
1639 }
1640 }
1641
1642 .mysticky-welcomebar-attention-tada.animation-start .mysticky-welcomebar-btn a {
1643 -webkit-animation-name: tada;
1644 animation-name: tada;
1645 }
1646
1647 @-webkit-keyframes heartBeat {
1648 0% {
1649 -webkit-transform: scale(1);
1650 transform: scale(1);
1651 }
1652
1653 14% {
1654 -webkit-transform: scale(1.3);
1655 transform: scale(1.3);
1656 }
1657
1658 28% {
1659 -webkit-transform: scale(1);
1660 transform: scale(1);
1661 }
1662
1663 42% {
1664 -webkit-transform: scale(1.3);
1665 transform: scale(1.3);
1666 }
1667
1668 70% {
1669 -webkit-transform: scale(1);
1670 transform: scale(1);
1671 }
1672 }
1673
1674 @keyframes heartBeat {
1675 0% {
1676 -webkit-transform: scale(1);
1677 transform: scale(1);
1678 }
1679
1680 14% {
1681 -webkit-transform: scale(1.3);
1682 transform: scale(1.3);
1683 }
1684
1685 28% {
1686 -webkit-transform: scale(1);
1687 transform: scale(1);
1688 }
1689
1690 42% {
1691 -webkit-transform: scale(1.3);
1692 transform: scale(1.3);
1693 }
1694
1695 70% {
1696 -webkit-transform: scale(1);
1697 transform: scale(1);
1698 }
1699 }
1700
1701 .mysticky-welcomebar-attention-heartbeat.animation-start .mysticky-welcomebar-btn a {
1702 -webkit-animation-name: heartBeat;
1703 animation-name: heartBeat;
1704 -webkit-animation-duration: 1.3s;
1705 animation-duration: 1.3s;
1706 -webkit-animation-timing-function: ease-in-out;
1707 animation-timing-function: ease-in-out;
1708 }
1709
1710 @-webkit-keyframes wobble {
1711 from {
1712 -webkit-transform: translate3d(0, 0, 0);
1713 transform: translate3d(0, 0, 0);
1714 }
1715
1716 15% {
1717 -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
1718 transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
1719 }
1720
1721 30% {
1722 -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
1723 transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
1724 }
1725
1726 45% {
1727 -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
1728 transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
1729 }
1730
1731 60% {
1732 -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
1733 transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
1734 }
1735
1736 75% {
1737 -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
1738 transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
1739 }
1740
1741 to {
1742 -webkit-transform: translate3d(0, 0, 0);
1743 transform: translate3d(0, 0, 0);
1744 }
1745 }
1746
1747 @keyframes wobble {
1748 from {
1749 -webkit-transform: translate3d(0, 0, 0);
1750 transform: translate3d(0, 0, 0);
1751 }
1752
1753 15% {
1754 -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
1755 transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
1756 }
1757
1758 30% {
1759 -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
1760 transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
1761 }
1762
1763 45% {
1764 -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
1765 transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
1766 }
1767
1768 60% {
1769 -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
1770 transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
1771 }
1772
1773 75% {
1774 -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
1775 transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
1776 }
1777
1778 to {
1779 -webkit-transform: translate3d(0, 0, 0);
1780 transform: translate3d(0, 0, 0);
1781 }
1782 }
1783
1784 .mysticky-welcomebar-attention-wobble.animation-start .mysticky-welcomebar-btn a {
1785 -webkit-animation-name: wobble;
1786 animation-name: wobble;
1787 }
1788 @media only screen and (min-width: 768px) {
1789 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-entry-effect-fade.entry-effect {
1790 opacity: 1;
1791 }
1792 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-entry-effect-none.entry-effect {
1793 display: block;
1794 }
1795 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-fixed ,
1796 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed {
1797 top: 0;
1798 }
1799 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-fixed ,
1800 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed {
1801 bottom: 0;
1802 }
1803 }
1804 @media only screen and (max-width: 767px) {
1805 .mysticky-welcomebar-display-mobile.mysticky-welcomebar-entry-effect-fade.entry-effect {
1806 opacity: 1;
1807 }
1808 .mysticky-welcomebar-display-mobile.mysticky-welcomebar-entry-effect-none.entry-effect {
1809 display: block;
1810 }
1811 .mysticky-welcomebar-display-mobile.mysticky-welcomebar-position-top.mysticky-welcomebar-fixed ,
1812 .mysticky-welcomebar-display-mobile.mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed {
1813 top: 0;
1814 }
1815 .mysticky-welcomebar-display-mobile.mysticky-welcomebar-position-bottom.mysticky-welcomebar-fixed ,
1816 .mysticky-welcomebar-display-mobile.mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed {
1817 bottom: 0;
1818 }
1819 .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close {
1820 display: none;
1821 }
1822 .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-mobile .mysticky-welcomebar-close {
1823 display: inline-block;
1824 }
1825 .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn {
1826 display: none;
1827 }
1828 .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-mobile .mysticky-welcomebar-btn {
1829 display: block;
1830 }
1831 }
1832 @media only screen and (max-width: 480px) {
1833 .mysticky-welcomebar-fixed-wrap {
1834 padding: 15px 36px 35px 10px;
1835 }
1836 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn {
1837 padding-left: 10px;
1838 }
1839 .mysticky-welcomebar-fixed .mysticky-welcomebar-close {
1840 right: 7px;
1841 }
1842 }
1843 </style>
1844 <?php
1845 }
1846 add_action( 'wp_footer', 'mysticky_welcome_bar_frontend' );