promote_wpdt.php
47 lines
| 1 | <?php |
| 2 | ?> |
| 3 | <div class="notice notice-info is-dismissible am-promote-wpdt-notice"> |
| 4 | <div id="am-promote-wpdt-section"> |
| 5 | <div id="am-first-section"> |
| 6 | <img class="am-wpdt-logo" src="<?php echo AMELIA_URL ?>public/wpdt/img/wpdt-promo-left.webp" alt="WPDT Left"> |
| 7 | </div> |
| 8 | <div id="am-second-section"> |
| 9 | <img class="am-wpdt-logo" src="<?php echo AMELIA_URL ?>public/wpdt/img/wpDataTables-logo.svg" alt="WPDT Logo"> |
| 10 | <img class="am-wpdt-logo-mobile" src="<?php echo AMELIA_URL ?>public/wpdt/img/wpDT-logo-w.webp" alt="WPDT Logo"> |
| 11 | <p class="am-wpdt-message"><?php esc_html_e("Have you tried our table plugin?", "wpamelia") ?></p> |
| 12 | <button id="am-download-it" onclick="window.open('https://wpdatatables.com/pricing/?utm_source=amelia-lite&utm_medium=banner&utm_content=wpdt&utm_campaign=wpdt', '_blank')"> |
| 13 | <?php esc_html_e("Get started", "wpamelia") ?> |
| 14 | </button> |
| 15 | </div> |
| 16 | <div id="am-third-section"> |
| 17 | <img class="am-wpdt-pic-1" src="<?php echo AMELIA_URL ?>public/wpdt/img/wpdt-promo-right.webp" alt="WPDT right"> |
| 18 | </div> |
| 19 | </div> |
| 20 | <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button> |
| 21 | </div> |
| 22 | <script> |
| 23 | (function ($) { |
| 24 | $(function () { |
| 25 | $('.am-promote-wpdt-notice .notice-dismiss').on('click', function (e) { |
| 26 | e.preventDefault() |
| 27 | $.ajax({ |
| 28 | url: ajaxurl, |
| 29 | method: 'POST', |
| 30 | data: { |
| 31 | 'action': 'amelia_remove_wpdt_promo_notice' |
| 32 | }, |
| 33 | dataType: 'json', |
| 34 | async: !0, |
| 35 | success: function (e) { |
| 36 | if (e == 'success') { |
| 37 | $('.am-promote-wpdt-notice').slideUp('fast') |
| 38 | } |
| 39 | } |
| 40 | }) |
| 41 | }) |
| 42 | }) |
| 43 | })(jQuery) |
| 44 | |
| 45 | </script> |
| 46 | |
| 47 |