bar-preview.php
1 month ago
bar-settings.php
1 month ago
customize-bar.php
1 month ago
display-rules.php
1 month ago
email-signup.php
7 months ago
help.php
1 month ago
poptin-plugin.php
7 months ago
poptin-popup.php
7 months ago
stickymenu-dashboard.php
1 month ago
bar-preview.php
227 lines
| 1 | <?php |
| 2 | /** |
| 3 | * MSB BarPreview |
| 4 | * |
| 5 | * @author : Premio <contact@premio.io> |
| 6 | * @license : GPL2 |
| 7 | * */ |
| 8 | |
| 9 | if (defined('ABSPATH') === false) { |
| 10 | exit; |
| 11 | } |
| 12 | $button_postion_relative_text = (isset($welcomebar['mysticky_welcomebar_button_postion_relative_text']) ) ? esc_attr($welcomebar['mysticky_welcomebar_button_postion_relative_text']) : ''; |
| 13 | $button_text_postion = (isset($welcomebar['mysticky_welcomebar_button_text_postion']) ) ? esc_attr($welcomebar['mysticky_welcomebar_button_text_postion']) : 'center'; |
| 14 | $button_text_postion_clss = ''; |
| 15 | if ( $button_postion_relative_text == 1 ) { |
| 16 | $button_text_postion_clss = 'mysticky-welcomebar-position-' . $button_text_postion; |
| 17 | } |
| 18 | ?> |
| 19 | <div class="mysticky-welcomebar-preview-wrap"> |
| 20 | <div class="mysticky-welcomebar-setting-right mysticky-welcomebar-preview"> |
| 21 | <div class="mysticky-welcomebar-backword-page"> |
| 22 | <a href="<?php echo esc_url(admin_url("admin.php?page=my-stickymenu-welcomebar"));?>"><span class="dashicons dashicons-arrow-left-alt2 back-dashboard" style="color: unset;font-size: 17px;"></span> <?php esc_html_e('Back to Dashboard', 'mystickymenu'); ?></a> |
| 23 | </div> |
| 24 | <div class="mysticky-welcomebar-header-title"> |
| 25 | <h3><?php esc_html_e('Preview', 'mystickymenu'); ?></h3> |
| 26 | </div> |
| 27 | <div class="mysticky-welcomebar-preview-screen"> |
| 28 | <div class="mysticky-welcomebar-fixed mysticky-welcomebar-display-desktop <?php echo esc_attr($display_main_class); ?>" > |
| 29 | <div class="mysticky-welcomebar-fixed-wrap <?php echo esc_attr($button_text_postion_clss);?>"> |
| 30 | <?php |
| 31 | $content_width = (isset($welcomebar['mysticky_welcomebar_enable_lead']) && $welcomebar['mysticky_welcomebar_enable_lead'] === '1') ? '90%' : '75%'; |
| 32 | ?> |
| 33 | <div class="mysticky-welcomebar-content" style="width:<?php echo esc_attr($content_width); ?>"> |
| 34 | <div class="mysticky-welcomebar-static_text" style="display:<?php echo (isset($welcomebar['mysticky_welcomebar_text_type']) && $welcomebar['mysticky_welcomebar_text_type'] == 'static_text') ? 'block' : 'none'; ?>"> |
| 35 | <?php echo isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase";?> |
| 36 | </div> |
| 37 | </div> |
| 38 | |
| 39 | <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; ?>> |
| 40 | <input type="text" class="preview-lead-name" placeholder="<?php echo esc_attr($welcomebar['lead_name_placeholder']);?>"/> |
| 41 | <input type="text" class="preview-lead-email" placeholder="<?php echo esc_attr($welcomebar['lead_email_placeholder']);?>" style="display:<?php echo (isset($welcomebar['mysticky_welcomebar_lead_input']) && $welcomebar['mysticky_welcomebar_lead_input'] == 'email_address') ? 'flex' : 'none';?>"/> |
| 42 | <input type="text" class="preview-lead-phone" placeholder="<?php echo esc_attr($welcomebar['lead_phone_placeholder']);?>" style="display:<?php echo (isset($welcomebar['mysticky_welcomebar_lead_input']) && $welcomebar['mysticky_welcomebar_lead_input'] == 'phone') ? 'flex' : 'none';?>"/> |
| 43 | </div> |
| 44 | |
| 45 | <div class="mysticky-welcomebar-btn"> |
| 46 | <?php |
| 47 | $mysticky_welcomebar_btn_text = isset($welcomebar['mysticky_welcomebar_btn_text']) ? stripslashes($welcomebar['mysticky_welcomebar_btn_text']) : "Got it!"; |
| 48 | $allowedTags = [ |
| 49 | 'p' => array( |
| 50 | 'style' => array(), |
| 51 | ), |
| 52 | 'br' => array(), |
| 53 | 'em' => array(), |
| 54 | 'span' => array( |
| 55 | 'style' => array(), |
| 56 | ), |
| 57 | 'u' => array(), |
| 58 | 'strong' => array(), |
| 59 | 'underline' => array(), |
| 60 | ]; |
| 61 | ?> |
| 62 | <a class="msb-welcomebar-btn" href="#" > |
| 63 | <span class="button-text"> |
| 64 | <?php echo wp_kses($mysticky_welcomebar_btn_text, $allowedTags);?> |
| 65 | </span> |
| 66 | </a> |
| 67 | </div> |
| 68 | <?php |
| 69 | $x_color = (isset($welcomebar['mysticky_welcomebar_x_color'])) ? esc_attr($welcomebar['mysticky_welcomebar_x_color']) : '#000000'; |
| 70 | ?> |
| 71 | <span class="mysticky-welcomebar-close" style="color:<?php echo esc_attr($x_color);?>" tabindex="0" role="button" aria-label="close">X</span> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div class="timer-message" <?php if(isset($welcomebar['mysticky_welcomebar_enable_lead']) && $welcomebar['mysticky_welcomebar_enable_lead'] != 1):?> style="display:none;"<?php endif;?>> |
| 75 | <p><span class="dashicons dashicons-info"></span> The elements will be displayed in 1-line on your actual website. <a class="save_change" href="#"><?php esc_html_e('Save changes', 'mystickymenu'); ?></a> and <a href="<?php echo esc_url(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> |
| 76 | </div> |
| 77 | <div class="mysticky-welcomebar-full-screen"> |
| 78 | <button type="button" class="welcomebar-full-screen-btn"> |
| 79 | <?php esc_html_e( 'Show Fullscreen Preview', 'mystickymenu' );?> |
| 80 | <span class="dashicons dashicons-fullscreen-alt"></span> |
| 81 | </button> |
| 82 | |
| 83 | <button type="button" class="welcomebar-minimise-screen-btn" style="display:none;"> |
| 84 | <?php esc_html_e( 'Minimise Preview', 'mystickymenu' );?> |
| 85 | <span class="dashicons dashicons-fullscreen-exit-alt"></span> |
| 86 | </button> |
| 87 | </div> |
| 88 | </div> |
| 89 | <style id="button-hover-color"> |
| 90 | <?php if ( $welcomebar['mysticky_welcomebar_hover_effect'] != 'none' ) {?> |
| 91 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a:hover { |
| 92 | /*opacity: 0.7;*/ |
| 93 | <?php if ( $welcomebar['mysticky_welcomebar_hover_effect'] != 'none' ) : ?> color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btnhovertxtcolor']); ?>; <?php endif;?> |
| 94 | <?php if ( $welcomebar['mysticky_welcomebar_hover_effect'] == 'border_effect_button' ) : ?> background: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btnhovercolor']); ?>; <?php endif;?> |
| 95 | |
| 96 | -moz-box-shadow: 1px 2px 4px rgba(0, 0, 0,0.5); |
| 97 | -webkit-box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5); |
| 98 | box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5); |
| 99 | } |
| 100 | <?php } ?> |
| 101 | <?php if ( $welcomebar['mysticky_welcomebar_hover_effect'] == 'border_effect_button' ) : ?> |
| 102 | .mysticky-welcomebar-btn:before, |
| 103 | .mysticky-welcomebar-btn:after { |
| 104 | background: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btnhoverbordercolor']); ?>; |
| 105 | z-index: 0; |
| 106 | } |
| 107 | .mysticky-welcomebar-btn a:before, |
| 108 | .mysticky-welcomebar-btn a:after { |
| 109 | background: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btnhoverbordercolor']); ?>; |
| 110 | z-index: 0; |
| 111 | } |
| 112 | <?php endif;?> |
| 113 | <?php if ( $welcomebar['mysticky_welcomebar_hover_effect'] == 'fill_effect_button' ) : ?> |
| 114 | .mysticky-welcomebar-btn a:after { |
| 115 | background: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btnhovercolor']); ?>; |
| 116 | z-index: -1; |
| 117 | border-radius: 4px; |
| 118 | } |
| 119 | .mysticky-welcomebar-btn a:before, |
| 120 | .mysticky-welcomebar-btn a:after { |
| 121 | background: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btnhovercolor']); ?>; |
| 122 | z-index: -1; |
| 123 | } |
| 124 | <?php endif;?> |
| 125 | </style> |
| 126 | <style> |
| 127 | .morphext > .morphext__animated { |
| 128 | display: inline-block; |
| 129 | } |
| 130 | .mysticky-welcomebar-fixed { |
| 131 | background-color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_bgcolor']); ?>; |
| 132 | font-family: <?php echo esc_attr($welcomebar['mysticky_welcomebar_font']); ?>; |
| 133 | position: absolute; |
| 134 | left: 0; |
| 135 | right: 0; |
| 136 | opacity: 0; |
| 137 | z-index: 9; |
| 138 | -webkit-transition: all 1s ease 0s; |
| 139 | -moz-transition: all 1s ease 0s; |
| 140 | transition: all 1s ease 0s; |
| 141 | } |
| 142 | .mysticky-welcomebar-fixed-wrap { |
| 143 | width: 98%; |
| 144 | min-height: 60px; |
| 145 | padding: 10px 29px 10px 20px; |
| 146 | display: flex; |
| 147 | align-items: center; |
| 148 | justify-content: center; |
| 149 | } |
| 150 | .mysticky-welcomebar-preview-mobile-screen .mysticky-welcomebar-fixed{ |
| 151 | padding: 0 25px; |
| 152 | } |
| 153 | .mysticky-welcomebar-position-top { |
| 154 | top:0; |
| 155 | } |
| 156 | .mysticky-welcomebar-position-bottom { |
| 157 | bottom:0; |
| 158 | } |
| 159 | .mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in { |
| 160 | top: -80px; |
| 161 | } |
| 162 | .mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in { |
| 163 | bottom: -80px; |
| 164 | } |
| 165 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in.entry-effect { |
| 166 | top:0; |
| 167 | opacity: 1; |
| 168 | } |
| 169 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in.entry-effect { |
| 170 | bottom:0; |
| 171 | opacity: 1; |
| 172 | } |
| 173 | .mysticky-welcomebar-entry-effect-fade { |
| 174 | opacity: 0; |
| 175 | } |
| 176 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-entry-effect-fade.entry-effect { |
| 177 | opacity: 1; |
| 178 | } |
| 179 | .mysticky-welcomebar-entry-effect-none { |
| 180 | display: none; |
| 181 | } |
| 182 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-entry-effect-none.entry-effect { |
| 183 | display: block; |
| 184 | opacity: 1; |
| 185 | } .mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed { |
| 186 | top: 0; |
| 187 | } |
| 188 | .mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed { |
| 189 | bottom: 0; |
| 190 | } |
| 191 | .mysticky-welcomebar-fixed .mysticky-welcomebar-content p a, |
| 192 | .mysticky-welcomebar-fixed .mysticky-welcomebar-content p { |
| 193 | color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_bgtxtcolor']); ?>; |
| 194 | font-size: <?php echo esc_attr($welcomebar['mysticky_welcomebar_fontsize']); ?>px; |
| 195 | font-family: inherit; |
| 196 | margin: 0; |
| 197 | padding: 0; |
| 198 | line-height: 1.2; |
| 199 | font-weight: 400; |
| 200 | } |
| 201 | .mysticky-welcomebar-fixed.mysticky-site-front.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn { |
| 202 | display: block; |
| 203 | margin-left:5px; |
| 204 | } |
| 205 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a { |
| 206 | background-color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btncolor']); ?>; |
| 207 | font-family: inherit; |
| 208 | color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btntxtcolor']); ?>; |
| 209 | border-radius: 4px; |
| 210 | text-decoration: none; |
| 211 | display: inline-block; |
| 212 | vertical-align: top; |
| 213 | line-height: 1.2; |
| 214 | font-size: <?php echo esc_attr($welcomebar['mysticky_welcomebar_fontsize']) ?>px; |
| 215 | font-weight: 400; |
| 216 | padding: 5px 15px; |
| 217 | white-space: nowrap; |
| 218 | text-align: center; |
| 219 | } |
| 220 | |
| 221 | @media only screen and (max-width: 1024px) { |
| 222 | .mysticky-welcomebar-fixed { |
| 223 | padding: 0 10px 0 10px; |
| 224 | } |
| 225 | } |
| 226 | </style> |
| 227 | </div> |