html-admin-page-addons.php
2 years ago
html-admin-page-builder.php
4 years ago
html-admin-page-entries-view.php
3 years ago
html-admin-page-export.php
3 years ago
html-admin-page-form-templates.php
3 years ago
html-admin-page-import.php
3 years ago
html-admin-page-tools-logs.php
4 years ago
html-admin-page-tools.php
5 years ago
html-admin-settings.php
7 years ago
html-deactivation-popup.php
3 years ago
html-notice-allow-usage.php
2 years ago
html-notice-custom.php
6 years ago
html-notice-php-deprecation.php
3 years ago
html-notice-review.php
2 years ago
html-notice-survey.php
4 years ago
html-notice-update.php
6 years ago
html-notice-updated.php
6 years ago
html-notice-updating.php
6 years ago
html-notice-allow-usage.php
73 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Notice - Allow Usage |
| 4 | * |
| 5 | * @package EverestForms\Admin\Notice |
| 6 | */ |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | ?> |
| 11 | <div id="message" class="updated everest-forms-message evf-allow-usage-notice"> |
| 12 | <div class="everest-forms-logo"> |
| 13 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.15,4l1.23,2H15.49L14.26,4ZM20,20H2.21L12,4.09,18.1,14H10.77L12,12h2.52L12,7.91,5.79,18H20.56l1.23,2ZM17.94,10,16.71,8H20.6l1.23,2Z"/></svg> |
| 14 | </div> |
| 15 | <div class="everest-forms-message--content"> |
| 16 | <h3 class="everest-forms-message__title"> |
| 17 | <?php esc_html_e( 'Contribute to the enhancement', 'everest-forms' ); ?> |
| 18 | </h3> |
| 19 | <p class="everest-forms-message__description"> |
| 20 | <?php |
| 21 | if ( false !== evf_get_license_plan() ) { |
| 22 | printf( |
| 23 | wp_kses( |
| 24 | __( 'Help us improve the plugin\'s features by sharing <a href="https://docs.everestforms.net/docs/misc-settings-4/#2-toc-title" target="_blank">non-sensitive plugin data</a> with us.', 'everest-forms' ), |
| 25 | array( |
| 26 | 'a' => array( |
| 27 | 'href' => array(), |
| 28 | 'target' => array() |
| 29 | ) |
| 30 | ) |
| 31 | ) |
| 32 | ); |
| 33 | } else { |
| 34 | printf( |
| 35 | wp_kses( |
| 36 | __( ' Help us improve the plugin\'s features and receive an instant discount coupon with occasional email updates by sharing <a href="https://docs.everestforms.net/docs/misc-settings-4/#2-toc-title" target="_blank">non-sensitive plugin data</a> with us.', 'everest-forms' ), |
| 37 | array( |
| 38 | 'a' => array( |
| 39 | 'href' => array(), |
| 40 | 'target' => array() |
| 41 | ) |
| 42 | ) |
| 43 | ) |
| 44 | ); |
| 45 | } |
| 46 | ?> |
| 47 | </p> |
| 48 | <p class="everest-forms-message__action submit"> |
| 49 | <a href="#" class="button button-primary evf-dismiss-allow-usage-notice evf-allow-data-sharing" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-smiley"></span><?php esc_html_e( 'Allow', 'everest-forms' ); ?></a> |
| 50 | <a href="#" class="button button-secondary evf-dismiss-allow-usage-notice evf-deny-data-sharing" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-dismiss"></span><?php esc_html_e( 'No, Thanks', 'everest-forms' ); ?></a> |
| 51 | </p> |
| 52 | </div> |
| 53 | </div> |
| 54 | <script type="text/javascript"> |
| 55 | jQuery( document ).ready( function ( $ ) { |
| 56 | $( document ).on( 'click', '.evf-dismiss-allow-usage-notice', function ( event ) { |
| 57 | event.preventDefault(); |
| 58 | var allow_usage_tracking = false; |
| 59 | |
| 60 | if( $(this).hasClass('evf-allow-data-sharing') ) { |
| 61 | allow_usage_tracking = true; |
| 62 | } |
| 63 | |
| 64 | $.post( ajaxurl, { |
| 65 | action: 'everest_forms_allow_usage_dismiss', |
| 66 | allow_usage_tracking: allow_usage_tracking, |
| 67 | _wpnonce: '<?php echo esc_js( wp_create_nonce( 'allow_usage_nonce' ) ); ?>' |
| 68 | } ); |
| 69 | $( '.evf-allow-usage-notice' ).remove(); |
| 70 | } ); |
| 71 | } ); |
| 72 | </script> |
| 73 |