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