mystickymenu
Last commit date
css
1 year ago
fonts
4 years ago
images
1 year ago
js
1 year ago
languages
2 years ago
class-review-box.php
1 year ago
class-upgrade-box.php
1 year ago
help.php
1 year ago
index.php
8 years ago
mystickymenu-admin-widgetanalytics.php
1 year ago
mystickymenu-affiliate.php
1 year ago
mystickymenu-contact-leads.php
1 year ago
mystickymenu-deactivate-form.php
1 year ago
mystickymenu-fonts.php
2 years ago
mystickymenu-popup.php
1 year ago
mystickymenu-review-popup.php
1 year ago
mystickymenu.php
1 year ago
mystickymeny-new-welcomebar.php
1 year ago
readme.txt
1 year ago
recommended-plugins.php
1 year ago
stickymenu-dashboard.php
1 year ago
uninstall.php
2 years ago
update.php
1 year ago
upgrade-to-pro.php
1 year ago
welcome-bar.php
1 year ago
update.php
319 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) { exit; } |
| 3 | $email = (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == "playground.wordpress.net")?"":get_option('admin_email'); |
| 4 | ?> |
| 5 | <style> |
| 6 | body { |
| 7 | background: #ffffff !important; |
| 8 | } |
| 9 | </style> |
| 10 | <div class="myStickymenu-updates-form"> |
| 11 | <div class="updates-form-form-left"> |
| 12 | <div class="updates-form-form-left-text">premio</div> |
| 13 | <img src="<?php echo esc_url(MYSTICKYMENU_URL) ?>/images/wcupdate_email.svg" style="width: 230px;margin: 60px 0px 20px 0px;" /> |
| 14 | <p>Grow your WordPress websites with our plugins</p> |
| 15 | </div> |
| 16 | <div class="updates-form-form-right"> |
| 17 | <div class="update-title">Be the first to know product updates, tips & discounts</div> |
| 18 | <p>Be among the first to know about our latest features & what we're working on. Plus insider offers & flash sales</p> |
| 19 | <div class="updates-form"> |
| 20 | <div class="update-form-input"> |
| 21 | <div class="mail-icon"> |
| 22 | <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 23 | <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="2" y="4" width="20" height="16"> |
| 24 | <path fill-rule="evenodd" clip-rule="evenodd" d="M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6ZM20 6L12 11L4 6H20ZM12 13L4 8V18H20V8L12 13Z" fill="white"/> |
| 25 | </mask> |
| 26 | <g mask="url(#mask0)"> |
| 27 | <rect width="24" height="24" fill="#94A3B8"/> |
| 28 | </g> |
| 29 | </svg> |
| 30 | </div> |
| 31 | <input id="myStickymenu_update_email" autocomplete="off" value="<?php echo esc_attr($email) ?>" placeholder="Email address"> |
| 32 | <button href="javascript:;" class="button button-primary form-submit-btn yes">Sign Up</button> |
| 33 | <p id="suggestion"></p> |
| 34 | </div> |
| 35 | <!-- <div class="update-form-skip-button"> |
| 36 | <button href="javascript:;" class="button button-secondary form-cancel-btn no">Skip</button> |
| 37 | </div> --> |
| 38 | </div> |
| 39 | |
| 40 | <div class="update-notice-latter"> |
| 41 | <span><a href="javascript:;" class="form-cancel-btn no">No, I will do it later</a></span> |
| 42 | </div> |
| 43 | |
| 44 | <div class="update-notice"> |
| 45 | You can remove yourself from the list whenever you want, no strings attached |
| 46 | </div> |
| 47 | <input type="hidden" id="myStickymenu_update_nonce" value="<?php echo esc_html(wp_create_nonce("myStickymenu_update_nonce")); ?>"> |
| 48 | </div> |
| 49 | </div> |
| 50 | <style> |
| 51 | |
| 52 | @font-face { |
| 53 | font-family: 'Lato'; |
| 54 | src: url('<?php echo esc_url(MYSTICKYMENU_URL."fonts/Lato-Regular.ttf");?>'); |
| 55 | } |
| 56 | |
| 57 | #wpwrap{ |
| 58 | background: url('<?php echo esc_url(MYSTICKYMENU_URL);?>images/update-bg.jpg'); |
| 59 | background-position: bottom center; |
| 60 | background-size: cover; |
| 61 | } |
| 62 | .myStickymenu-updates-form { |
| 63 | width: 768px; |
| 64 | padding: 0 30px 0 0; |
| 65 | box-shadow: 0px 20px 25px rgb(0 0 0 / 10%), 0px 10px 10px rgb(0 0 0 / 4%); |
| 66 | display: flex; |
| 67 | margin: 100px auto 0; |
| 68 | font-family: Lato, sans-serif; |
| 69 | background:#ffffff; |
| 70 | } |
| 71 | .update-title{ |
| 72 | font-style: normal; |
| 73 | font-weight: 700; |
| 74 | font-size: 30px; |
| 75 | align-items: center; |
| 76 | color: #334155; |
| 77 | position: relative; |
| 78 | line-height: 36px; |
| 79 | font-family:Lato; |
| 80 | } |
| 81 | .updates-form-form-left { |
| 82 | padding: 25px 0px 50px 0px; |
| 83 | background: linear-gradient(180deg, #3C139A 25.79%, #2A0D76 72.72%); |
| 84 | border-radius: 14.42px 0px 0px 14.419px; |
| 85 | text-align:center; |
| 86 | width: 70%; |
| 87 | } |
| 88 | .updates-form-form-left p{ |
| 89 | font-size: 16px; |
| 90 | line-height: 1.5; |
| 91 | margin: 0; |
| 92 | color: #fff; |
| 93 | padding: 0px 36px; |
| 94 | font-family:Lato; |
| 95 | } |
| 96 | |
| 97 | .updates-form-form-left span{ |
| 98 | color: #fff; |
| 99 | margin-left: 0px; |
| 100 | margin-top: 0px; |
| 101 | position: absolute; |
| 102 | font-size: 20px; |
| 103 | line-height: 0.5; |
| 104 | font-family:Lato; |
| 105 | } |
| 106 | |
| 107 | .updates-form-form-left-text{ |
| 108 | color: #fff; |
| 109 | font-size: 20px; |
| 110 | font-weight: 600; |
| 111 | text-align: left; |
| 112 | padding-left: 30px; |
| 113 | font-family:Lato; |
| 114 | } |
| 115 | |
| 116 | .updates-form-form-right{ |
| 117 | margin-left: 16px; |
| 118 | padding: 70px 47px 70px 45px; |
| 119 | } |
| 120 | |
| 121 | .updates-form-form-right p { |
| 122 | font-size: 16px; |
| 123 | font-style: normal; |
| 124 | font-weight: normal; |
| 125 | line-height: 150%; |
| 126 | position: relative; |
| 127 | color: #475569; |
| 128 | margin: 32px 0px 20px 0px; |
| 129 | font-family:Lato; |
| 130 | } |
| 131 | /*.updates-form-form-right p:after { |
| 132 | content: ""; |
| 133 | border: 1px solid #3C85F7; |
| 134 | position: absolute; |
| 135 | bottom: 5px; |
| 136 | left: 0; |
| 137 | width: 90px; |
| 138 | }*/ |
| 139 | .updates-form { |
| 140 | /* display: flex; */ |
| 141 | } |
| 142 | .update-form-input { |
| 143 | position: relative; |
| 144 | } |
| 145 | .update-form-input input { |
| 146 | width: 385px; |
| 147 | background: #F4F4F5; |
| 148 | border: 1px solid #F4F4F5; |
| 149 | box-sizing: border-box; |
| 150 | border-radius: 8px; |
| 151 | height: 42px; |
| 152 | line-height: 40px; |
| 153 | padding: 0 50px 0 40px; |
| 154 | font-size: 13px; |
| 155 | box-sizing: border-box; |
| 156 | color: #334155; |
| 157 | } |
| 158 | .update-form-input .form-submit-btn { |
| 159 | background: #5A00F0; |
| 160 | border-radius: 8px; |
| 161 | border: none; |
| 162 | color: #fff; |
| 163 | font-style: normal; |
| 164 | font-weight: 500; |
| 165 | font-size: 13px; |
| 166 | line-height: 150%; |
| 167 | height: 36px; |
| 168 | padding: 0 10px; |
| 169 | position: absolute; |
| 170 | right: 3px; |
| 171 | top: 3px; |
| 172 | width: 100px; |
| 173 | font-family:Lato; |
| 174 | } |
| 175 | |
| 176 | .update-form-input #myStickymenu_update_email:hover{ |
| 177 | border-bottom: 1px solid #5A00F0; |
| 178 | border-radius: 8px 8px 0px 0px; |
| 179 | } |
| 180 | |
| 181 | .update-form-input #myStickymenu_update_email:focus-visible{ |
| 182 | border :1px solid #5A00F0 !important; |
| 183 | outline: 1px !important; |
| 184 | border-radius: 8px; |
| 185 | } |
| 186 | |
| 187 | .update-form-input .form-submit-btn:hover{ |
| 188 | background: #5A00F0; |
| 189 | } |
| 190 | |
| 191 | .updates-form .form-cancel-btn.no { |
| 192 | margin: 0 0 0 3px; |
| 193 | background: transparent; |
| 194 | border: none; |
| 195 | color: #64748B; |
| 196 | font-size: 13px; |
| 197 | line-height: 40px; |
| 198 | padding: 0 0 0 5px; |
| 199 | } |
| 200 | .updates-form .form-cancel-btn.no:hover { |
| 201 | color: #334155; |
| 202 | } |
| 203 | .mail-icon { |
| 204 | position: absolute; |
| 205 | top: 8px; |
| 206 | left: 10px; |
| 207 | } |
| 208 | .update-notice { |
| 209 | margin: 50px 22px 0 0px; |
| 210 | font-size: 16px; |
| 211 | line-height: 150%; |
| 212 | color: #28375A; |
| 213 | text-align:center; |
| 214 | font-family:Lato; |
| 215 | } |
| 216 | |
| 217 | .update-notice-latter{ |
| 218 | margin: 20px 0px; |
| 219 | width: 100%; |
| 220 | text-align: center; |
| 221 | color:#28375A; |
| 222 | } |
| 223 | |
| 224 | .update-notice-latter span a{ |
| 225 | text-decoration: underline; |
| 226 | cursor: pointer; |
| 227 | color:#28375A; |
| 228 | } |
| 229 | |
| 230 | |
| 231 | .update-title:after{ |
| 232 | content: ''; |
| 233 | background: #605DEC; |
| 234 | width: 19%; |
| 235 | height: 2px; |
| 236 | position: absolute; |
| 237 | bottom: -16px; |
| 238 | left: 0; |
| 239 | } |
| 240 | #suggestion { |
| 241 | margin: 10px 0 0; |
| 242 | padding: 0; |
| 243 | font-size: 14px; |
| 244 | color: #970029; |
| 245 | } |
| 246 | #suggestion i { |
| 247 | color: #2596be; |
| 248 | font-weight: bold; |
| 249 | cursor: pointer; |
| 250 | } |
| 251 | .eac-sugg{ |
| 252 | color:#c1c1c1; |
| 253 | margin-left: -4px; |
| 254 | } |
| 255 | |
| 256 | </style> |
| 257 | <script> |
| 258 | jQuery(document).ready(function($) { |
| 259 | var mailcheck_flg = false; |
| 260 | $(document).on("click", ".updates-form button, a.form-cancel-btn", function () { |
| 261 | //$('#myStickymenu_update_email').trigger( 'blur' ); |
| 262 | msbmailcheck(); |
| 263 | if ( $('#suggestion').html() != '' && mailcheck_flg == false ) { |
| 264 | mailcheck_flg = true; |
| 265 | return false; |
| 266 | } |
| 267 | |
| 268 | var updateStatus = 0; |
| 269 | if ($(this).hasClass("yes")) { |
| 270 | updateStatus = 1; |
| 271 | } |
| 272 | $(".updates-form button").attr("disabled", true); |
| 273 | $.ajax({ |
| 274 | url: ajaxurl, |
| 275 | type: 'post', |
| 276 | data: { |
| 277 | action: "sticky_menu_update_status", |
| 278 | status: updateStatus, |
| 279 | nonce: $("#myStickymenu_update_nonce").val(), |
| 280 | email: $("#myStickymenu_update_email").val() |
| 281 | }, |
| 282 | type: 'post', |
| 283 | cache: false, |
| 284 | success: function () { |
| 285 | mailcheck_flg = false; |
| 286 | window.location.reload(); |
| 287 | } |
| 288 | }) |
| 289 | }); |
| 290 | |
| 291 | var checkdomains = ["yahoo.com" ,"hotmail.com" ,"gmail.com" ,"me.com" ,"aol.com" ,"mac.com" ,"live.com" ,"comcast.net" ,"googlemail.com" ,"msn.com" ,"hotmail.co.uk" ,"facebook.com" ,"verizon.net" ,"sbcglobal.net" ,"att.net" ,"gmx.com" ,"outlook.com" ,"icloud.com" ,"protonmail.com"]; |
| 292 | var topLevelDomains = ["com", "net", "org", "me", "io"]; |
| 293 | |
| 294 | function msbmailcheck() { |
| 295 | jQuery('#myStickymenu_update_email').mailcheck({ |
| 296 | domains: checkdomains, // optional |
| 297 | topLevelDomains: topLevelDomains, // optional |
| 298 | suggested: function(element, suggestion) { |
| 299 | // callback code |
| 300 | jQuery('#suggestion').html("Did you mean <b><i>" + suggestion.full + "</b></i>?"); |
| 301 | }, |
| 302 | empty: function(element) { |
| 303 | // callback code |
| 304 | jQuery('#suggestion').html(''); |
| 305 | } |
| 306 | }); |
| 307 | } |
| 308 | |
| 309 | $("#myStickymenu_update_email").emailautocomplete({ |
| 310 | domains: ["yahoo.com" ,"hotmail.com" ,"gmail.com" ,"me.com" ,"aol.com" ,"mac.com" ,"live.com" ,"comcast.net" ,"googlemail.com" ,"msn.com" ,"hotmail.co.uk" ,"facebook.com" ,"verizon.net" ,"sbcglobal.net" ,"att.net" ,"gmx.com" ,"outlook.com" ,"icloud.com" ,"protonmail.com"] |
| 311 | }); |
| 312 | |
| 313 | $(document).on("click", "#suggestion i", function (){ |
| 314 | $("#myStickymenu_update_email").val($(this).text()); |
| 315 | setTimeout(function(){ jQuery('#suggestion').html(''); }, 1000); |
| 316 | }); |
| 317 | }); |
| 318 | </script> |
| 319 |