PluginProbe ʕ •ᴥ•ʔ
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) / 2.2
My Sticky Bar – Floating Notification Bar & Sticky Header (formerly myStickymenu) v2.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 index.php 8 years ago mystickymenu-fonts.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
861 lines
1 <?php
2
3 function mysticky_welcome_bar_backend() {
4 $nonce = wp_create_nonce('mysticky_option_welcomebar_update');
5 $nonce_reset = wp_create_nonce('mysticky_option_welcomebar_reset');
6
7 $welcomebar = get_option( 'mysticky_option_welcomebar' );
8 if ( $welcomebar == '' || empty($welcomebar)) {
9 $welcomebar = mysticky_welcomebar_pro_widget_default_fields();
10 }
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_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;
28 ?>
29 <form class="mysticky-welcomebar-form" id="mysticky_welcomebar_form" method="post" action="#">
30 <div class="mysticky-welcomebar-header-title">
31 <h3><?php _e('Welcome Bar', 'myStickymenu'); ?></h3>
32 <label for="mysticky-welcomebar-contact-form-enabled" class="mysticky-welcomebar-switch">
33 <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' );?> />
34 <span class="slider"></span>
35 </label>
36 </div>
37 <div class="mysticky-welcomebar-setting-wrap">
38 <div class="mysticky-welcomebar-setting-left">
39 <div class="mysticky-welcomebar-setting-block">
40 <div class="mysticky-welcomebar-subheader-title">
41 <h4><?php _e('Design', 'myStickymenu'); ?></h4>
42 </div>
43 <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-setting-position">
44 <label><?php _e('Position', 'myStickymenu'); ?></label>
45 <div class="mysticky-welcomebar-setting-content-right">
46 <label>
47 <input name="mysticky_option_welcomebar[mysticky_welcomebar_position]" value= "top" type="radio" <?php checked( @$welcomebar['mysticky_welcomebar_position'], 'top' );?> />
48 <?php _e("Top", 'mystickymenu'); ?>
49 </label>
50 <label>
51 <input name="mysticky_option_welcomebar[mysticky_welcomebar_position]" value="bottom" type="radio" disabled />
52 <?php _e("Bottom", 'mystickymenu'); ?>
53 </label>
54 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
55 </div>
56 </div>
57 <div class="mysticky-welcomebar-setting-content">
58 <label><?php _e('Height', 'myStickymenu'); ?></label>
59 <div class="mysticky-welcomebar-setting-content-right">
60 <div class="px-wrap">
61 <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_height" name="mysticky_option_welcomebar[mysticky_welcomebar_height]" value="60" disabled />
62 <span class="input-px">PX</span>
63 </div>
64 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
65 </div>
66 </div>
67 <div class="mysticky-welcomebar-setting-content">
68 <label><?php _e('Background Color', 'myStickymenu'); ?></label>
69 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker">
70 <input type="text" id="mysticky_welcomebar_bgcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_bgcolor]" class="my-color-field" value="<?php echo $welcomebar['mysticky_welcomebar_bgcolor'];?>" />
71 </div>
72 </div>
73 <div class="mysticky-welcomebar-setting-content">
74 <label><?php _e('Background Text Color', 'myStickymenu'); ?></label>
75 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker">
76 <input type="text" id="mysticky_welcomebar_bgtxtcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_bgtxtcolor]" class="my-color-field" value="<?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'];?>" />
77 </div>
78 </div>
79 <div class="mysticky-welcomebar-setting-content">
80 <label><?php _e('Font', 'myStickymenu'); ?></label>
81 <div class="mysticky-welcomebar-setting-content-right">
82 <select name="mysticky_option_welcomebar[mysticky_welcomebar_font]" class="form-fonts">
83 <option value=""><?php _e( 'Select font family', 'myStickymenu' );?></option>
84 <?php $group= ''; foreach( myStickymenu_fonts() as $key=>$value):
85 if ($value != $group){
86 echo '<optgroup label="' . $value . '">';
87 $group = $value;
88 }
89 ?>
90 <option value="<?php echo esc_attr($key);?>" <?php selected( @$welcomebar['mysticky_welcomebar_font'], $key ); ?>><?php echo esc_html($key);?></option>
91 <?php endforeach;?>
92 </select>
93 </div>
94 </div>
95 <div class="mysticky-welcomebar-setting-content">
96 <label><?php _e('Font Size', 'myStickymenu'); ?></label>
97 <div class="mysticky-welcomebar-setting-content-right">
98 <div class="px-wrap">
99 <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'];?>" />
100 <span class="input-px">PX</span>
101 </div>
102 </div>
103 </div>
104 <div class="mysticky-welcomebar-setting-content">
105 <label><?php _e('Bar Text', 'myStickymenu'); ?></label>
106 <div class="mysticky-welcomebar-setting-content-right">
107 <input type="text" id="mysticky_bar_text" class="mystickyinput" name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]" value="<?php echo $welcomebar['mysticky_welcomebar_bar_text'];?>" />
108 </div>
109 </div>
110 <div class="mysticky-welcomebar-setting-content">
111 <label><?php _e('Show X', 'myStickymenu'); ?></label>
112 <div class="mysticky-welcomebar-setting-content-right">
113 <label>
114 <input name="mysticky_option_welcomebar[mysticky_welcomebar_x_desktop]" value= "desktop" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_x_desktop'], 'desktop' );?> />
115 <?php _e( 'Desktop', 'mystickymenu' );?>
116 </label>
117 <label>
118 <input name="mysticky_option_welcomebar[mysticky_welcomebar_x_mobile]" value= "mobile" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_x_mobile'], 'mobile' );?> />
119 <?php _e( 'Mobile', 'mystickymenu' );?>
120 </label>
121 </div>
122 </div>
123 </div>
124 <div class="mysticky-welcomebar-setting-block">
125 <div class="mysticky-welcomebar-subheader-title">
126 <h4><?php _e('Button', 'myStickymenu'); ?></h4>
127 </div>
128 <div class="mysticky-welcomebar-setting-content">
129 <label><?php _e('Button', 'myStickymenu'); ?></label>
130 <div class="mysticky-welcomebar-setting-content-right">
131 <label>
132 <input name="mysticky_option_welcomebar[mysticky_welcomebar_btn_desktop]" value= "desktop" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_btn_desktop'], 'desktop' );?> />
133 <?php _e( 'Desktop', 'mystickymenu' );?>
134 </label>
135 <label>
136 <input name="mysticky_option_welcomebar[mysticky_welcomebar_btn_mobile]" value= "mobile" type="checkbox"<?php checked( @$welcomebar['mysticky_welcomebar_btn_mobile'], 'mobile' );?> />
137 <?php _e( 'Mobile', 'mystickymenu' );?>
138 </label>
139 </div>
140 </div>
141 <div class="mysticky-welcomebar-setting-content">
142 <label><?php _e('Button Color', 'myStickymenu'); ?></label>
143 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker">
144 <input type="text" id="mysticky_welcomebar_btncolor" name="mysticky_option_welcomebar[mysticky_welcomebar_btncolor]" class="my-color-field" value="<?php echo esc_attr($welcomebar['mysticky_welcomebar_btncolor']);?>" />
145 </div>
146 </div>
147 <div class="mysticky-welcomebar-setting-content">
148 <label><?php _e('Button Text Color', 'myStickymenu'); ?></label>
149 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker">
150 <input type="text" id="mysticky_welcomebar_btntxtcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_btntxtcolor]" class="my-color-field" value="<?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'];?>" />
151 </div>
152 </div>
153 <div class="mysticky-welcomebar-setting-content">
154 <label><?php _e('Button Text', 'myStickymenu'); ?></label>
155 <div class="mysticky-welcomebar-setting-content-right">
156 <input type="text" id="mysticky_welcomebar_btn_text" class="mystickyinput" name="mysticky_option_welcomebar[mysticky_welcomebar_btn_text]" value="<?php echo $welcomebar['mysticky_welcomebar_btn_text'];?>" />
157 </div>
158 </div>
159 <div class="mysticky-welcomebar-setting-content">
160 <label><?php _e('Action', 'myStickymenu'); ?></label>
161 <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-redirect-wrap">
162 <div class="mysticky-welcomebar-setting-action">
163 <select name="mysticky_option_welcomebar[mysticky_welcomebar_actionselect]" class="mysticky-welcomebar-action">
164 <option value="redirect_to_url" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'redirect_to_url' ); ?>><?php _e( 'Redirect to URL', 'myStickymenu' );?></option>
165 <option value="close_bar" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'close_bar' ); ?>><?php _e( 'Close bar', 'myStickymenu' );?></option>
166 </select>
167 </div>
168 <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-redirect" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?> >
169 <input type="text" id="mysticky_welcomebar_redirect" class="mystickyinput" 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"); ?>" />
170 </div>
171 <div class="mysticky-welcomebar-setting-newtab mysticky-welcomebar-redirect" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?> >
172 <label>
173 <input name="mysticky_option_welcomebar[mysticky_welcomebar_redirect_newtab]" value= "1" type="checkbox" disabled />
174 <?php _e( 'Open in a new tab', 'mystickymenu' );?>
175 </label>
176 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
177 </div>
178 </div>
179 </div>
180 <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-setting-remove-getbar">
181 <label><?php _e('Remove Get Bar', 'myStickymenu'); ?></label>
182 <div class="mysticky-welcomebar-setting-content-right">
183 <div class="mysticky-welcomebar-switch">
184 <input type="checkbox" id="mysticky-welcomebar-remove-getbar" name="mysticky_option_welcomebar[mysticky_welcomebar_remove_getbar]" value="1" disabled />
185 <span class="slider"></span>
186 </div>
187 <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
188 </div>
189 </div>
190 </div>
191 <div class="mysticky-welcomebar-setting-block">
192 <div class="mysticky-welcomebar-subheader-title">
193 <h4><?php _e('Display Rules', 'myStickymenu'); ?></h4>
194 </div>
195 <div class="mysticky-welcomebar-upgrade-main mysticky_device_upgrade">
196 <span class="myStickymenu-upgrade">
197 <a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( ' Upgrade Now', 'mystickymenu' );?></a>
198 </span>
199 <div class="mysticky-welcomebar-setting-content">
200 <label><?php _e('Devices', 'myStickymenu'); ?></label>
201 <div class="mysticky-welcomebar-setting-content-right">
202 <label>
203 <input name="mysticky_option_welcomebar[mysticky_welcomebar_device_desktop]" value= "desktop" type="checkbox" checked disabled />
204 <?php _e( 'Desktop', 'mystickymenu' );?>
205 </label>
206 <label>
207 <input name="mysticky_option_welcomebar[mysticky_welcomebar_device_mobile]" value= "mobile" type="checkbox" checked disabled />
208 <?php _e( 'Mobile', 'mystickymenu' );?>
209 </label>
210 </div>
211 </div>
212 <div class="mysticky-welcomebar-setting-content">
213 <label><?php _e('Trigger', 'myStickymenu'); ?></label>
214 <div class="mysticky-welcomebar-setting-content-right">
215 <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-trigger-wrap">
216 <label>
217 <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' );?>
218 </label>
219 <label>
220 <input type="radio" name="mysticky_option_welcomebar[mysticky_welcomebar_trigger]" value="after_scroll" disabled />&nbsp;<?php _e( 'After Scroll', 'myStickymenu' );?>
221 </label>
222 </div>
223 <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-triggersec">
224 <div class="px-wrap">
225 <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_triggersec" name="mysticky_option_welcomebar[mysticky_welcomebar_triggersec]" value="0" disabled />
226 <span class="input-px"><?php echo ( isset($welcomebar['mysticky_welcomebar_trigger']) && $welcomebar['mysticky_welcomebar_trigger'] == 'after_scroll' ) ? '%' : 'Sec'; ?></span>
227 </div>
228 </div>
229 </div>
230 </div>
231 <div class="mysticky-welcomebar-setting-content">
232 <label><?php _e('Expiry date', 'myStickymenu'); ?></label>
233 <div class="mysticky-welcomebar-setting-content-right">
234 <div class="mysticky-welcomebar-expirydate">
235 <input type="text" id="mysticky_welcomebar_expirydate" name="mysticky_option_welcomebar[mysticky_welcomebar_expirydate]" placeholder="<?php _e('No expiry date', 'myStickymenu'); ?>" value="" disabled />
236 <span class="dashicons dashicons-calendar-alt"></span>
237 </div>
238 </div>
239 </div>
240 <div class="mysticky-welcomebar-setting-content show-on-apper">
241 <label><?php _e('Page targeting', 'myStickymenu'); ?></label>
242 <div class="mysticky-welcomebar-setting-content-right">
243 <a href="javascript:void(0);" class="create-rule" id="create-rule"><?php esc_html_e( "Add Rule", "mystickyelements" );?></a>
244 </div>
245 <div class="mysticky-welcomebar-page-options-html" style="display: none">
246 <div class="mysticky-welcomebar-page-option">
247 <div class="url-content">
248 <div class="mysticky-welcomebar-url-select">
249 <select name="mysticky_option_welcomebar[page_settings][__count__][shown_on]" id="url_shown_on___count___option" disabled>
250 <option value="show_on"><?php esc_html_e("Show on", "mysticky" );?></option>
251 <option value="not_show_on"><?php esc_html_e("Don't show on", "mysticky" );?></option>
252 </select>
253 </div>
254 <div class="mysticky-welcomebar-url-option">
255 <select class="mysticky-welcomebar-url-options" name="mysticky_option_welcomebar[page_settings][__count__][option]" id="url_rules___count___option" disabled>
256 <option selected="selected" disabled value=""><?php esc_html_e("Select Rule", "mysticky" );?></option>
257 </select>
258 </div>
259 <div class="mysticky-welcomebar-url-box">
260 <span class='mysticky-welcomebar-url'><?php echo site_url("/"); ?></span>
261 </div>
262 <div class="mysticky-welcomebar-url-values">
263 <input type="text" value="" name="mysticky_option_welcomebar[page_settings][__count__][value]" id="url_rules___count___value" disabled />
264 </div>
265 <div class="clear"></div>
266 </div>
267 </div>
268 </div>
269 </div>
270 <div class="mysticky-welcomebar-page-options mysticky-welcomebar-setting-content-right" id="mysticky-welcomebar-page-options"></div>
271 </div>
272 </div>
273 </div>
274 <div class="mysticky-welcomebar-setting-right">
275 <div class="mysticky-welcomebar-header-title">
276 <h3><?php _e('Preview', 'mystickyelements'); ?></h3>
277 </div>
278 <div class="mysticky-welcomebar-preview-screen">
279 <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">
280 <div class="mysticky-welcomebar-fixed mysticky-welcomebar-display-desktop <?php echo $display_main_class; ?>" >
281 <div class="mysticky-welcomebar-content">
282 <p><?php echo isset($welcomebar['mysticky_welcomebar_bar_text'])?$welcomebar['mysticky_welcomebar_bar_text']:"Get 30% off your first purchase";?></p>
283 </div>
284 <div class="mysticky-welcomebar-btn">
285 <a href="#" ><?php echo isset($welcomebar['mysticky_welcomebar_btn_text']) ? $welcomebar['mysticky_welcomebar_btn_text'] : "Got it!";?></a>
286 </div>
287 <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a>
288 <a href="#" class="mysticky-welcomebar-getbar"><?php _e( 'Get Bar', 'mystickymenu' );?></a>
289 </div>
290 </div>
291 </div>
292 </div>
293 <div class="mysticky-welcomebar-submit">
294 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save', 'mystickymenu');?>">
295 </div>
296 <input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
297 <input type="hidden" name="active_tab_element" value="1">
298 <input type="hidden" id="save_welcome_bar" name="save_welcome_bar" value="">
299
300 </form>
301 <form class="mysticky-welcomebar-form-reset" method="post" action="#">
302 <div class="mysticky-welcomebar-submit">
303 <input type="submit" name="mysticky_welcomebar_reset" id="reset" class="button button-secondary" value="<?php _e('Reset', 'mystickymenu');?>">
304 </div>
305 <input type="hidden" name="nonce_reset" value="<?php echo $nonce_reset; ?>">
306 <input type="hidden" name="active_tab_element" value="1">
307 </form>
308 <div id="mysticky-welcomebar-save-confirm" style="display:none;" title="<?php esc_attr_e( 'Welcome Bar is currently off', 'mystickymenu' ); ?>">
309 <p>
310 <?php _e('Your Welcome Bar is currently turned off, would you like to save and show it on your site?', 'mystickymenu' ); ?>
311 </p>
312 </div>
313 <style>
314 .mysticky-welcomebar-fixed {
315 height: 60px;
316 background-color: <?php echo $welcomebar['mysticky_welcomebar_bgcolor'] ?>;
317 font-family: <?php echo $welcomebar['mysticky_welcomebar_font'] ?>;
318 position: absolute;
319 left: 0;
320 right: 0;
321 display: none;
322 align-items: center;
323 justify-content: center;
324 padding: 20px 30px 20px 10px;
325 z-index: 9999999;
326 }
327 .mysticky-welcomebar-preview-mobile-screen .mysticky-welcomebar-fixed{
328 padding: 0 25px;
329 }
330 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-fixed {
331 display: flex;
332 }
333 .mysticky-welcomebar-position-top {
334 top:0;
335 }
336 .mysticky-welcomebar-position-bottom {
337 bottom:0;
338 }
339 .mysticky-welcomebar-fixed .mysticky-welcomebar-content p {
340 color: <?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'] ?>;
341 font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px;
342 font-family: inherit;
343 margin: 0;
344 padding: 0;
345 line-height: 1.2;
346 font-weight: 400;
347 }
348 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn {
349 padding-left: 30px;
350 display: none;
351 }
352 .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn {
353 display: block;
354 }
355 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a {
356 background-color: <?php echo $welcomebar['mysticky_welcomebar_btncolor'] ?>;
357 font-family: inherit;
358 color: <?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'] ?>;
359 border-radius: 4px;
360 text-decoration: none;
361 display: inline-block;
362 vertical-align: top;
363 line-height: 1.2;
364 font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px;
365 font-weight: 400;
366 padding: 5px 20px;
367 white-space: nowrap;
368 }
369 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a:hover {
370 /*opacity: 0.7;*/
371 -moz-box-shadow: 1px 2px 4px rgba(0, 0, 0,0.5);
372 -webkit-box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
373 box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
374 }
375 .mysticky-welcomebar-fixed .mysticky-welcomebar-close {
376 display: none;
377 vertical-align: top;
378 width: 20px;
379 height: 20px;
380 text-align: center;
381 text-decoration: none;
382 line-height: 20px;
383 border-radius: 5px;
384 color: #000;
385 position: absolute;
386 font-family: Lato;
387 top: 5px;
388 right: 5px;
389 -webkit-transition: all 0.5s ease 0s;
390 -moz-transition: all 0.5s ease 0s;
391 transition: all 0.5s ease 0s;
392 -webkit-transform-origin: 50% 50%;
393 -moz-transform-origin: 50% 50%;
394 transform-origin: 50% 50%;
395 }
396 .mysticky-welcomebar-fixed .mysticky-welcomebar-close:hover {
397 opacity: 0.5;
398 -webkit-transform: rotate(180deg);
399 -moz-transform: rotate(180deg);
400 transform: rotate(180deg);
401 }
402 .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close {
403 display: inline-block;
404 }
405 .mysticky-welcomebar-getbar:focus,
406 .mysticky-welcomebar-getbar:active,
407 .mysticky-welcomebar-getbar {
408 background-color: rgba(140,140,140,0.5) !important;
409 border-radius: 8px !important;
410 color: #FFFFFF !important;
411 position: absolute !important;
412 padding: 3px !important;
413 bottom: 3px !important;
414 left: 3px !important;
415 font-size: 10px !important;
416 line-height: 1.4 !important;
417 margin: 0 !important;
418 display: inline-block !important;
419 vertical-align: top !important;
420 font-family: Poppins !important;
421 text-decoration: none !important;
422 visibility: visible !important;
423 }
424 .mysticky-welcomebar-getbar:hover {
425 color: #000000 !important;
426 opacity: 0.5 !important;
427 }
428
429 @media only screen and (max-width: 1024px) {
430 .mysticky-welcomebar-fixed {
431 padding: 0 20px 0 10px;
432 }
433 .mysticky-welcomebar-fixed .mysticky-welcomebar-close {
434 width: 20px;
435 height: 20px;
436 line-height: 20px;
437 right: 0px;
438 }
439 }
440 </style>
441
442 <?php
443 }
444
445 function mysticky_welcomebar_pro_widget_default_fields() {
446 return array(
447 'mysticky_welcomebar_position' => 'top',
448 'mysticky_welcomebar_height' => '60',
449 'mysticky_welcomebar_bgcolor' => '#03ed96',
450 'mysticky_welcomebar_bgtxtcolor' => '#000000',
451 'mysticky_welcomebar_font' => 'Poppins',
452 'mysticky_welcomebar_fontsize' => '16',
453 'mysticky_welcomebar_bar_text' => 'Get 30% off your first purchase',
454 'mysticky_welcomebar_x_desktop' => 'desktop',
455 'mysticky_welcomebar_x_mobile' => 'mobile',
456 'mysticky_welcomebar_btn_desktop' => 'desktop',
457 'mysticky_welcomebar_btn_mobile' => 'mobile',
458 'mysticky_welcomebar_btncolor' => '#000000',
459 'mysticky_welcomebar_btntxtcolor' => '#ffffff',
460 'mysticky_welcomebar_btn_text' => 'Got it!',
461 'mysticky_welcomebar_actionselect' => 'close_bar',
462 'mysticky_welcomebar_redirect' => 'https://www.yourdomain.com',
463 'mysticky_welcomebar_redirect_newtab' => '',
464 'mysticky_welcomebar_device_desktop' => 'desktop',
465 'mysticky_welcomebar_device_mobile' => 'mobile',
466 'mysticky_welcomebar_trigger' => 'after_a_few_seconds',
467 'mysticky_welcomebar_triggersec' => '0',
468 'mysticky_welcomebar_expirydate' => '',
469 'mysticky_welcomebar_page_settings' => '',
470 );
471 }
472
473 function mysticky_welcome_bar_frontend(){
474 $welcomebar = get_option( 'mysticky_option_welcomebar' );
475
476 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'] ) ) {
477 return;
478 }
479 $mysticky_welcomebar_showx_desktop = $mysticky_welcomebar_showx_mobile = '';
480 $mysticky_welcomebar_btn_desktop = $mysticky_welcomebar_btn_mobile = '';
481 $mysticky_welcomebar_display_desktop = $mysticky_welcomebar_display_mobile = '';
482 if( isset($welcomebar['mysticky_welcomebar_x_desktop']) ) {
483 $mysticky_welcomebar_showx_desktop = ' mysticky-welcomebar-showx-desktop';
484 }
485 if( isset($welcomebar['mysticky_welcomebar_x_mobile']) ) {
486 $mysticky_welcomebar_showx_mobile = ' mysticky-welcomebar-showx-mobile';
487 }
488 if( isset($welcomebar['mysticky_welcomebar_btn_desktop']) ) {
489 $mysticky_welcomebar_btn_desktop = ' mysticky-welcomebar-btn-desktop';
490 }
491 if( isset($welcomebar['mysticky_welcomebar_btn_mobile']) ) {
492 $mysticky_welcomebar_btn_mobile = ' mysticky-welcomebar-btn-mobile';
493 }
494
495 $mysticky_welcomebar_display_desktop = ' mysticky-welcomebar-display-desktop';
496 $mysticky_welcomebar_display_mobile = ' mysticky-welcomebar-display-mobile';
497
498 $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;
499
500 if( isset($welcomebar['mysticky_welcomebar_actionselect']) ) {
501 if( $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' ) {
502 $mysticky_welcomebar_actionselect_url = esc_url( $welcomebar['mysticky_welcomebar_redirect'] );
503 } else {
504 $mysticky_welcomebar_actionselect_url = 'javascript:void(0)';
505 }
506 }
507 if( !isset($welcomebar['mysticky_welcomebar_enable']) ) {
508 if ( $welcomebar['mysticky_welcomebar_position'] == 'top' ) {
509 $welcomebar_enable_block = "top: -60px";
510 } else {
511 $welcomebar_enable_block = "bottom: -60px";
512 }
513 }
514
515 ?>
516 <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']);?>">
517 <div class="mysticky-welcomebar-content">
518 <p><?php echo isset($welcomebar['mysticky_welcomebar_bar_text'])?$welcomebar['mysticky_welcomebar_bar_text']:"Get 30% off your first purchase";?></p>
519 </div>
520 <div class="mysticky-welcomebar-btn">
521 <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>
522 </div>
523 <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a>
524 <a href="https://premio.io/downloads/mystickymenu/?utm_source=credit&domain=<?php echo $_SERVER['HTTP_HOST']; ?>" class="mysticky-welcomebar-getbar" target="_blank"><?php _e( 'Get Bar', 'mystickymenu' );?></a>
525 </div>
526 <script>
527
528 jQuery(document).ready(function($){
529 if( jQuery( '.mysticky-welcomebar-fixed' ).data('position') == 'top' ) {
530 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-60px' );
531 } else {
532 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-60px' );
533 }
534 if ( sessionStorage.getItem("welcomebar_close") === null ){
535
536 var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
537
538 if ( after_trigger == 'after_a_few_seconds' ) {
539 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
540 if ( $( window ).width() > 767 ) {
541 var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
542 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
543 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height');
544 setTimeout(function(){
545 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
546 if ( welcombar_position == 'top' ) {
547 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
548 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
549 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
550 $( 'html' ).css( 'margin-bottom', '' );
551 $( 'html' ).attr( 'style', 'margin-top: 60px !important' );
552 } else {
553 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
554 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
555 $( 'html' ).css( 'margin-top', '' );
556 $( 'html' ).attr( 'style', 'margin-bottom: 60px !important' );
557 }
558 }, trigger_sec );
559 }
560 }
561 }
562 if ( $( window ).width() < 767 ) {
563 if ( after_trigger == 'after_a_few_seconds' ) {
564 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
565 var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
566 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
567 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height');
568 setTimeout(function(){
569 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
570 if ( welcombar_position == 'top' ) {
571 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
572 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
573 $( 'html' ).css( 'margin-bottom', '' );
574 $( 'html' ).attr( 'style', 'margin-top: 60px !important' );
575 } else {
576 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
577 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
578 $( 'html' ).css( 'margin-top', '' );
579 $( 'html' ).attr( 'style', 'margin-bottom: 60px !important' );
580 }
581 }, trigger_sec );
582 }
583 }
584 }
585 }
586 $( window ).resize( function(){
587 if ( sessionStorage.getItem("welcomebar_close") === null ){
588 var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
589 if ( after_trigger == 'after_a_few_seconds' ) {
590 var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
591 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
592 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height');
593 if ( $( window ).width() < 767 ) {
594 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
595 setTimeout(function(){
596 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
597 if ( welcombar_position == 'top' ) {
598 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
599 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
600 $( 'html' ).css( 'margin-bottom', '' );
601 $( 'html' ).attr( 'style', 'margin-top: 60px !important' );
602 } else {
603 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
604 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
605 $( 'html' ).css( 'margin-top', '' );
606 $( 'html' ).attr( 'style', 'margin-bottom: 60px !important' );
607 }
608 }, trigger_sec );
609 }
610 } else {
611 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
612 setTimeout(function(){
613 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
614 if ( welcombar_position == 'top' ) {
615 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
616 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
617 $( 'html' ).css( 'margin-bottom', '' );
618 $( 'html' ).attr( 'style', 'margin-top: 60px !important' );
619 } else {
620 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
621 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
622 $( 'html' ).css( 'margin-top', '' );
623 $( 'html' ).attr( 'style', 'margin-bottom: 60px !important' );
624 }
625 }, trigger_sec );
626 }
627 }
628 }
629 }
630 } );
631
632 jQuery(window).scroll(function(){
633 if ( sessionStorage.getItem("welcomebar_close") === null ){
634 if ( after_trigger === 'after_scroll' ) {
635 var scroll = 100 * $(window).scrollTop() / ($(document).height() - $(window).height());
636 var after_scroll_val = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec');
637 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
638 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height');
639 if( scroll > after_scroll_val ) {
640 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
641 if ( $( window ).width() > 767 ) {
642 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
643 if ( welcombar_position == 'top' ) {
644 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
645 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
646 $( 'html' ).css( 'margin-bottom', '' );
647 $( 'html' ).attr( 'style', 'margin-top: 60px !important' );
648 } else {
649 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
650 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
651 $( 'html' ).css( 'margin-top', '' );
652 $( 'html' ).attr( 'style', 'margin-bottom: 60px !important' );
653 }
654 }
655 }
656 if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
657 if ( $( window ).width() < 767 ) {
658 jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
659 if ( welcombar_position == 'top' ) {
660 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' );
661 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
662 $( 'html' ).css( 'margin-bottom', '' );
663 $( 'html' ).attr( 'style', 'margin-top: 60px !important' );
664 } else {
665 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
666 jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
667 $( 'html' ).css( 'margin-top', '' );
668 $( 'html' ).attr( 'style', 'margin-bottom: 60px !important' );
669 }
670 }
671 }
672 }
673 }
674 }
675
676 });
677 jQuery( '.mysticky-welcomebar-close, .mysticky-welcomebar-btn a' ).on( 'click', function(){
678 sessionStorage.setItem('welcomebar_close', 'close');
679 var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
680 var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height');
681 jQuery( '.mysticky-welcomebar-fixed' ).slideUp( 'slow' );
682 if ( welcombar_position == 'top' ) {
683 jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-' + welcombar_height + 'px' );
684 } else {
685 jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + welcombar_height + 'px' );
686 }
687 jQuery( 'html' ).css( 'margin-top', '' );
688 jQuery( 'html' ).css( 'margin-bottom', '' );
689 } );
690 });
691 </script>
692 <style>
693 .mysticky-welcomebar-fixed {
694 height: 60px;
695 background-color: <?php echo $welcomebar['mysticky_welcomebar_bgcolor'] ?>;
696 font-family: <?php echo $welcomebar['mysticky_welcomebar_font'] ?>;
697 position: fixed;
698 left: 0;
699 right: 0;
700 display: flex;
701 align-items: center;
702 justify-content: center;
703 padding: 20px 50px;
704 z-index: 9999999;
705 opacity: 0;
706 }
707 .mysticky-welcomebar-animation {
708 -webkit-transition: all 0.5s ease 0s;
709 -moz-transition: all 0.5s ease 0s;
710 transition: all 0.5s ease 0s;
711 }
712 .mysticky-welcomebar-position-top {
713 top: -60px;
714 }
715 .mysticky-welcomebar-position-bottom {
716 bottom: -60px;
717 }
718 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-fixed {
719 top: 0;
720 }
721 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-fixed {
722 bottom: 0;
723 }
724 .mysticky-welcomebar-fixed .mysticky-welcomebar-content p {
725 color: <?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'] ?>;
726 font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px;
727 margin: 0;
728 padding: 0;
729 line-height: 1.2;
730 font-family: inherit;
731 font-weight: 400;
732 }
733 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn {
734 padding-left: 30px;
735 display: none;
736 line-height: 1;
737 }
738 .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn {
739 display: block;
740 }
741 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a {
742 background-color: <?php echo $welcomebar['mysticky_welcomebar_btncolor'] ?>;
743 font-family: inherit;
744 color: <?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'] ?>;
745 border-radius: 4px;
746 text-decoration: none;
747 display: inline-block;
748 vertical-align: top;
749 line-height: 1.2;
750 font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px;
751 font-weight: 400;
752 padding: 5px 20px;
753 white-space: nowrap;
754 }
755 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a:hover {
756 /*opacity: 0.7;*/
757 -moz-box-shadow: 1px 2px 4px rgba(0, 0, 0,0.5);
758 -webkit-box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
759 box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
760 }
761 .mysticky-welcomebar-fixed .mysticky-welcomebar-close {
762 display: none;
763 vertical-align: top;
764 width: 30px;
765 height: 30px;
766 text-align: center;
767 line-height: 30px;
768 border-radius: 5px;
769 color: #000;
770 position: absolute;
771 top: 5px;
772 right: 10px;
773 outline: none;
774 font-family: Lato;
775 text-decoration: none;
776 -webkit-transition: all 0.5s ease 0s;
777 -moz-transition: all 0.5s ease 0s;
778 transition: all 0.5s ease 0s;
779 -webkit-transform-origin: 50% 50%;
780 -moz-transform-origin: 50% 50%;
781 transform-origin: 50% 50%;
782 }
783 .mysticky-welcomebar-fixed .mysticky-welcomebar-close:hover {
784 opacity: 0.5;
785 -webkit-transform: rotate(180deg);
786 -moz-transform: rotate(180deg);
787 transform: rotate(180deg);
788 }
789 .mysticky-welcomebar-fixed .mysticky-welcomebar-close span.dashicons {
790 font-size: 27px;
791 }
792 .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close {
793 display: inline-block;
794 }
795 .mysticky-welcomebar-getbar:focus,
796 .mysticky-welcomebar-getbar:active,
797 .mysticky-welcomebar-getbar {
798 background-color: rgba(140,140,140,0.5) !important;
799 border-radius: 8px !important;
800 color: #FFFFFF !important;
801 position: absolute !important;
802 padding: 3px !important;
803 bottom: 5px !important;
804 left: 10px !important;
805 font-size: 12px !important;
806 line-height: 1.4 !important;
807 margin: 0 !important;
808 display: inline-block !important;
809 vertical-align: top !important;
810 font-family: Poppins !important;
811 text-decoration: none !important;
812 visibility: visible !important;
813 outline: 0 !important;
814 }
815 .mysticky-welcomebar-getbar:hover {
816 color: #000000 !important;
817 opacity: 0.5 !important;
818 }
819 @media only screen and (max-width: 767px) {
820 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-fixed {
821 top: -60px;
822 }
823 .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-fixed {
824 bottom: -60px;
825 }
826 .mysticky-welcomebar-display-mobile.mysticky-welcomebar-position-top.mysticky-welcomebar-fixed {
827 top: 0;
828 }
829 .mysticky-welcomebar-display-mobile.mysticky-welcomebar-position-bottom.mysticky-welcomebar-fixed {
830 bottom: 0;
831 }
832 .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close {
833 display: none;
834 }
835 .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-mobile .mysticky-welcomebar-close {
836 display: inline-block;
837 }
838 .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn {
839 display: none;
840 }
841 .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-mobile .mysticky-welcomebar-btn {
842 display: block;
843 }
844 }
845 @media only screen and (max-width: 480px) {
846 .mysticky-welcomebar-fixed {
847 height: auto;
848 min-height: 60px;
849 padding: 15px 36px 35px 10px;
850 }
851 .mysticky-welcomebar-fixed .mysticky-welcomebar-btn {
852 padding-left: 10px;
853 }
854 .mysticky-welcomebar-fixed .mysticky-welcomebar-close {
855 right: 7px;
856 }
857 }
858 </style>
859 <?php
860 }
861 add_action( 'wp_footer', 'mysticky_welcome_bar_frontend' );