| 1 |
<?php |
| 2 |
/** |
| 3 |
* @var OptIn[] $list |
| 4 |
* @var string $hash |
| 5 |
*/ |
| 6 |
|
| 7 |
use forge12\contactform7\CF7DoubleOptIn\OptIn; |
| 8 |
|
| 9 |
$settings = \forge12\contactform7\CF7DoubleOptIn\CF7DoubleOptIn::getInstance()->getSettings(); |
| 10 |
$manual_delete_value = isset($settings['delete_unconfirmed']) ? $settings['delete_unconfirmed'] : 1; |
| 11 |
$manual_delete_period = isset($settings['delete_unconfirmed_period']) ? $settings['delete_unconfirmed_period'] : 'months'; |
| 12 |
$admin_email = get_option('admin_email'); |
| 13 |
|
| 14 |
?> |
| 15 |
<div class="f12-cf7-doubleoptin-optout f12-cf7-doubleoptin-optout-list"> |
| 16 |
<div class="f12-cf7-doubleoptin-optout-list--inner"> |
| 17 |
<table> |
| 18 |
<tr> |
| 19 |
<th> |
| 20 |
<?php _e('Hash', 'double-opt-in'); ?> |
| 21 |
</th> |
| 22 |
<th> |
| 23 |
<?php _e('Date', 'double-opt-in'); ?> |
| 24 |
</th> |
| 25 |
<th> |
| 26 |
<?php _e('Status', 'double-opt-in'); ?> |
| 27 |
</th> |
| 28 |
<th> |
| 29 |
<?php _e('Valid until', 'double-opt-in'); ?>* |
| 30 |
</th> |
| 31 |
<th> |
| 32 |
|
| 33 |
</th> |
| 34 |
</tr> |
| 35 |
<?php foreach ($list as $OptIn): ?> |
| 36 |
<tr> |
| 37 |
<td> |
| 38 |
<?php echo esc_html($OptIn->get_hash()); ?> |
| 39 |
</td> |
| 40 |
<td> |
| 41 |
<?php echo esc_html($OptIn->get_createtime('view')); ?> |
| 42 |
</td> |
| 43 |
<td> |
| 44 |
<?php if ($OptIn->is_confirmed()): ?> |
| 45 |
<div class="dashicons dashicons-yes"></div> |
| 46 |
<?php else: ?> |
| 47 |
<div class="dashicons dashicons-no"></div> |
| 48 |
<?php endif; ?> |
| 49 |
</td> |
| 50 |
<td> |
| 51 |
<?php if ($settings['delete'] == 0 || $settings['delete_unconfirmed'] == 0): ?> |
| 52 |
<center><?php _e('∞'); ?></center> |
| 53 |
<?php else: ?> |
| 54 |
<?php echo esc_html($OptIn->get_valid_until()); ?> |
| 55 |
<?php endif; ?> |
| 56 |
|
| 57 |
<?php if ($OptIn->is_confirmed() && $settings['delete'] != 0): ?> |
| 58 |
<small>(<?php echo esc_html($settings['delete']); ?> <?php echo esc_html($settings['delete_period']); ?> |
| 59 |
)</small> |
| 60 |
<?php endif; ?> |
| 61 |
<?php if (!$OptIn->is_confirmed() && $settings['delete_unconfirmed'] != 0): ?> |
| 62 |
<small>(<?php echo esc_html($settings['delete_unconfirmed']); ?> <?php echo esc_html($settings['delete_unconfirmed_period']); ?> |
| 63 |
)</small> |
| 64 |
<?php endif; ?> |
| 65 |
</td> |
| 66 |
<td> |
| 67 |
<?php if ($OptIn->is_confirmed()): ?> |
| 68 |
<a href="<?php echo $OptIn->get_link_optout(); ?>&hash=<?php echo $hash; ?>" target="_blank" |
| 69 |
class="button"><?php _e('Opt-Out now!', 'double-opt-in'); ?></a> |
| 70 |
<?php else: /* |
| 71 |
<a href="<?php echo $OptIn->get_link_optin(); ?>&hash=<?php echo $hash; ?>" target="_blank" |
| 72 |
class="button"><?php _e('Opt-In now!', 'double-opt-in'); ?></a> |
| 73 |
*/ endif; ?> |
| 74 |
</td> |
| 75 |
</tr> |
| 76 |
<?php endforeach; ?> |
| 77 |
</table> |
| 78 |
</div> |
| 79 |
<span class="hint">* <?php _e('The date indicates when your personal data will be deleted.', 'double-opt-in'); ?></span> |
| 80 |
<span class="hint">* |
| 81 |
<?php if ($manual_delete_value == 0): ?> |
| 82 |
<?php printf(__('Please note that even with manual opt-out, your data will be stored. Please contact the administrator to delete your personal data: %s.', 'double-opt-in'), $admin_email); ?> |
| 83 |
<?php else: ?> |
| 84 |
<?php printf(__('Please note that even with manual opt-out, your data will only be deleted in %d %s.', 'double-opt-in'), $manual_delete_value, $manual_delete_period); ?> |
| 85 |
<?php endif; ?> |
| 86 |
</span> |
| 87 |
</div> |