| @@ -1,96 +1,110 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Insights Notice File | |
| 4 | - */ | |
| 5 | - | |
| 6 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 7 | - exit; | |
| 8 | -} | |
| 9 | - | |
| 10 | -if ( ! function_exists( 'dci_popup_notice' ) ) { | |
| 11 | - function dci_popup_notice() { | |
| 12 | - ?> | |
| 13 | - <div class="dci-notice"> | |
| 14 | - <div class="dci-notice-wrapper"> | |
| 15 | - <div class="dci-header"> | |
| 16 | - <h2 class="dci-title"> | |
| 17 | - <?php esc_html_e( 'Never miss an important update.', 'data-collector-insights' ); ?> | |
| 18 | - </h2> | |
| 19 | - <p class="dci-desc"> | |
| 20 | - <?php esc_html_e( 'Get notified when there are new updates available for your plugins and themes. In the current version of this message it is clear that you are being sent a confirmation email to confirm your opt-in.', 'data-collector-insights' ); ?> | |
| 21 | - </p> | |
| 22 | - </div> | |
| 23 | - <div class="dci-actions"> | |
| 24 | - <form method="get"> | |
| 25 | - <input type="hidden" name="page" value="<?php //echo esc_attr( $_GET['page'] ); ?>"> | |
| 26 | - <button id="dci_allow_yes" name="dci_allow_status" value="yes" type="button" | |
| 27 | - class="dci-button-allow button button-primary"> | |
| 28 | - <?php esc_html_e( 'Allow & Continue', 'data-collector-insights' ); ?> | |
| 29 | - </button> | |
| 30 | - <button id="dci_allow_skip" name="dci_allow_status" value="skip" type="button" | |
| 31 | - class="dci-button-skip button button-secondary"> | |
| 32 | - <?php esc_html_e( 'Skip', 'data-collector-insights' ); ?> | |
| 33 | - </button> | |
| 34 | - </form> | |
| 35 | - </div> | |
| 36 | - <div class="dci-permission"> | |
| 37 | - <p> | |
| 38 | - <?php esc_html_e( 'Which permission are being granted?', 'data-collector-insights' ); ?> | |
| 39 | - </p> | |
| 40 | - </div> | |
| 41 | - <div class="dci-data-list"> | |
| 42 | - <ul> | |
| 43 | - <li> | |
| 44 | - <div class="dci-permission-item"> | |
| 45 | - <div class="dci-icon"> | |
| 46 | - <span class="dashicons dashicons-admin-users"></span> | |
| 47 | - </div> | |
| 48 | - <div class="dci-desc"> | |
| 49 | - <h3> | |
| 50 | - <?php esc_html_e( 'View Basic Profile Info.', 'data-collector-insights' ); ?> | |
| 51 | - </h3> | |
| 52 | - <p> | |
| 53 | - <?php esc_html_e( 'Your WordPress user\'s first & last name, and email address.', 'data-collector-insights' ); ?> | |
| 54 | - </p> | |
| 55 | - </div> | |
| 56 | - </div> | |
| 57 | - </li> | |
| 58 | - <li> | |
| 59 | - <div class="dci-permission-item"> | |
| 60 | - <div class="dci-icon"> | |
| 61 | - <span class="dashicons dashicons-admin-links"></span> | |
| 62 | - </div> | |
| 63 | - <div class="dci-desc"> | |
| 64 | - <h3> | |
| 65 | - <?php esc_html_e( 'View Basic Website Info.', 'data-collector-insights' ); ?> | |
| 66 | - </h3> | |
| 67 | - <p> | |
| 68 | - <?php esc_html_e( 'Homepage URL & title, WP & PHP versions, and site language.', 'data-collector-insights' ); ?> | |
| 69 | - </p> | |
| 70 | - </div> | |
| 71 | - </div> | |
| 72 | - </li> | |
| 73 | - <li> | |
| 74 | - <div class="dci-permission-item"> | |
| 75 | - <div class="dci-icon"> | |
| 76 | - <span class="dashicons dashicons-admin-plugins"></span> | |
| 77 | - </div> | |
| 78 | - <div class="dci-desc"> | |
| 79 | - <h3> | |
| 80 | - <?php esc_html_e( 'View Basic Plugin Info.', 'data-collector-insights' ); ?> | |
| 81 | - </h3> | |
| 82 | - <p> | |
| 83 | - <?php esc_html_e( 'Current Plugin & SDK versions, and if active or uninstalled.', 'data-collector-insights' ); ?> | |
| 84 | - </p> | |
| 85 | - </div> | |
| 86 | - </div> | |
| 87 | - </li> | |
| 88 | - </ul> | |
| 89 | - </div> | |
| 90 | - </div> | |
| 91 | - </div> | |
| 92 | - <?php | |
| 93 | - } | |
| 94 | - | |
| 95 | - add_action( 'in_admin_header', 'dci_popup_notice', 99999 ); | |
| 96 | -} | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Insights Notice File | |
| 4 | + */ | |
| 5 | + | |
| 6 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 7 | + exit; | |
| 8 | +} | |
| 9 | + | |
| 10 | +if ( ! function_exists( 'dci_popup_notice' ) ) { | |
| 11 | + function dci_popup_notice( $data ) { | |
| 12 | + | |
| 13 | + ?> | |
| 14 | + <div class="dci-notice"> | |
| 15 | + <div class="dci-notice-wrapper"> | |
| 16 | + <div class="dci-header"> | |
| 17 | + <!-- <div class="dci-logo"> | |
| 18 | + <img src="plugins_url( 'assets/images/logo.png', __FILE__ );" alt="logo"> | |
| 19 | + </div> --> | |
| 20 | + <h2 class="dci-title"> | |
| 21 | + <?php esc_html_e( 'Never miss an important update.', 'data-collector-insights' ); ?> | |
| 22 | + </h2> | |
| 23 | + <p class="dci-desc"> | |
| 24 | + <?php esc_html_e( 'Get notified when there are new updates available for your plugins and themes. In the current version of this message it is clear that you are being sent a confirmation email to confirm your opt-in.', 'data-collector-insights' ); ?> | |
| 25 | + </p> | |
| 26 | + </div> | |
| 27 | + <div class="dci-actions"> | |
| 28 | + <?php | |
| 29 | + $dci_name = isset( $data['name'] ) ? $data['name'] : ''; | |
| 30 | + $dci_date_name = isset( $data['date_name'] ) ? $data['date_name'] : ''; | |
| 31 | + $dci_allow_name = isset( $data['allow_name'] ) ? $data['allow_name'] : ''; | |
| 32 | + $nonce = isset( $data['nonce'] ) ? $data['nonce'] : ''; | |
| 33 | + ?> | |
| 34 | + <form method="get" class="dci-notice-data"> | |
| 35 | + <input type="hidden" name="dci_name" value="<?php echo esc_html( $dci_name ); ?>"> | |
| 36 | + <input type="hidden" name="dci_date_name" value="<?php echo esc_html( $dci_date_name ); ?>"> | |
| 37 | + <input type="hidden" name="dci_allow_name" value="<?php echo esc_html( $dci_allow_name ); ?>"> | |
| 38 | + <input type="hidden" name="nonce" value="<?php echo esc_html( $nonce ); ?>"> | |
| 39 | + | |
| 40 | + <button id="dci_allow_yes" name="dci_allow_status" value="yes" type="button" | |
| 41 | + class="dci-button-allow button button-primary"> | |
| 42 | + <?php esc_html_e( 'Allow & Continue', 'data-collector-insights' ); ?> | |
| 43 | + </button> | |
| 44 | + <button id="dci_allow_skip" name="dci_allow_status" value="skip" type="button" | |
| 45 | + class="dci-button-skip button button-secondary"> | |
| 46 | + <?php esc_html_e( 'Skip', 'data-collector-insights' ); ?> | |
| 47 | + </button> | |
| 48 | + </form> | |
| 49 | + </div> | |
| 50 | + <div class="dci-permission"> | |
| 51 | + <p> | |
| 52 | + <?php esc_html_e( 'Which permission are being granted?', 'data-collector-insights' ); ?> | |
| 53 | + </p> | |
| 54 | + </div> | |
| 55 | + <div class="dci-data-list"> | |
| 56 | + <ul> | |
| 57 | + <li> | |
| 58 | + <div class="dci-permission-item"> | |
| 59 | + <div class="dci-icon"> | |
| 60 | + <span class="dashicons dashicons-admin-users"></span> | |
| 61 | + </div> | |
| 62 | + <div class="dci-desc"> | |
| 63 | + <h3> | |
| 64 | + <?php esc_html_e( 'View Basic Profile Info.', 'data-collector-insights' ); ?> | |
| 65 | + </h3> | |
| 66 | + <p> | |
| 67 | + <?php esc_html_e( 'Your WordPress user\'s first & last name, and email address.', 'data-collector-insights' ); ?> | |
| 68 | + </p> | |
| 69 | + </div> | |
| 70 | + </div> | |
| 71 | + </li> | |
| 72 | + <li> | |
| 73 | + <div class="dci-permission-item"> | |
| 74 | + <div class="dci-icon"> | |
| 75 | + <span class="dashicons dashicons-admin-links"></span> | |
| 76 | + </div> | |
| 77 | + <div class="dci-desc"> | |
| 78 | + <h3> | |
| 79 | + <?php esc_html_e( 'View Basic Website Info.', 'data-collector-insights' ); ?> | |
| 80 | + </h3> | |
| 81 | + <p> | |
| 82 | + <?php esc_html_e( 'Homepage URL & title, WP & PHP versions, and site language.', 'data-collector-insights' ); ?> | |
| 83 | + </p> | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | + </li> | |
| 87 | + <li> | |
| 88 | + <div class="dci-permission-item"> | |
| 89 | + <div class="dci-icon"> | |
| 90 | + <span class="dashicons dashicons-admin-plugins"></span> | |
| 91 | + </div> | |
| 92 | + <div class="dci-desc"> | |
| 93 | + <h3> | |
| 94 | + <?php esc_html_e( 'View Basic Plugin Info.', 'data-collector-insights' ); ?> | |
| 95 | + </h3> | |
| 96 | + <p> | |
| 97 | + <?php esc_html_e( 'Current Plugin & SDK versions, and if active or uninstalled.', 'data-collector-insights' ); ?> | |
| 98 | + </p> | |
| 99 | + </div> | |
| 100 | + </div> | |
| 101 | + </li> | |
| 102 | + </ul> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | + <?php | |
| 107 | + } | |
| 108 | + | |
| 109 | + // add_action( 'in_admin_header', 'dci_popup_notice', 99999 ); | |
| 110 | +} | |