| 1 |
<?php |
| 2 |
defined( 'ABSPATH' ) || exit; |
| 3 |
/** |
| 4 |
* Variables passed from Notices::render_optin_section(): |
| 5 |
* |
| 6 |
* @var bool $is_enabled |
| 7 |
* @var string $wp_version |
| 8 |
* @var string $php_version |
| 9 |
* @var string $plugin_version |
| 10 |
* @var string $opt_level |
| 11 |
* @var string $next_gen |
| 12 |
* @var string $license_type |
| 13 |
*/ |
| 14 |
?> |
| 15 |
<div class="imagify-analytics-optin imagify-setting-line"> |
| 16 |
<label class="imagify-analytics-label" for="imagify-analytics-enabled"> |
| 17 |
<input |
| 18 |
type="checkbox" |
| 19 |
id="imagify-analytics-enabled" |
| 20 |
class="imagify-analytics-checkbox" |
| 21 |
value="1" |
| 22 |
<?php checked( $is_enabled, true ); ?> |
| 23 |
data-nonce="<?php echo esc_attr( wp_create_nonce( 'imagify_tracking_optin' ) ); ?>" |
| 24 |
> |
| 25 |
<span class="imagify-analytics-toggle-ui" aria-hidden="true"></span> |
| 26 |
<?php esc_html_e( 'Imagify Analytics', 'imagify' ); ?> |
| 27 |
</label> |
| 28 |
<p class="imagify-analytics-description"> |
| 29 |
<?php |
| 30 |
printf( |
| 31 |
/* translators: %1$s = opening <button> tag, %2$s = closing </button> tag */ |
| 32 |
esc_html__( 'I agree to share anonymous data with the development team to help improve Imagify. %1$sWhat info will we collect?%2$s', 'imagify' ), |
| 33 |
'<button type="button" class="imagify-btn-link imagify-modal-trigger" href="#imagify-analytics-info-modal">', |
| 34 |
'</button>' |
| 35 |
); |
| 36 |
?> |
| 37 |
</p> |
| 38 |
</div> |
| 39 |
|
| 40 |
<!-- "What info will we collect?" modal --> |
| 41 |
<div id="imagify-analytics-info-modal" class="imagify-modal" aria-hidden="true" role="dialog"> |
| 42 |
<div class="imagify-modal-content"> |
| 43 |
<button type="button" class="close-btn"> |
| 44 |
<i class="dashicons dashicons-no-alt" aria-hidden="true"></i> |
| 45 |
<span class="screen-reader-text"><?php esc_attr_e( 'Close', 'imagify' ); ?></span> |
| 46 |
</button> |
| 47 |
<p class="h2"><?php esc_html_e( 'Imagify Analytics', 'imagify' ); ?></p> |
| 48 |
<p> |
| 49 |
<?php |
| 50 |
printf( |
| 51 |
/* translators: %1$s = <strong>, %2$s = </strong> */ |
| 52 |
esc_html__( 'Below is a detailed view of all data Imagify will collect %1$sif granted permission.%2$s', 'imagify' ), |
| 53 |
'<strong>', |
| 54 |
'</strong>' |
| 55 |
); |
| 56 |
?> |
| 57 |
</p> |
| 58 |
<?php require IMAGIFY_PATH . 'views/part-analytics-data-table.php'; ?> |
| 59 |
<p> |
| 60 |
<em><?php esc_html_e( 'We never collect your images, their content, or any personal data — only anonymous performance metrics.', 'imagify' ); ?></em> |
| 61 |
</p> |
| 62 |
<?php if ( ! $is_enabled ) : ?> |
| 63 |
<p> |
| 64 |
<button type="button" id="imagify-analytics-enable-from-modal" class="button button-primary"> |
| 65 |
<?php esc_html_e( 'Activate Imagify Analytics', 'imagify' ); ?> |
| 66 |
</button> |
| 67 |
</p> |
| 68 |
<?php endif; ?> |
| 69 |
</div> |
| 70 |
</div> |
| 71 |
|