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