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