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