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