PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 2.12
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v2.12
5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 3.0.70 3.0.71 3.0.72 All 35 releases
double-opt-in / templates / list-optins.php

list-optins.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 2.12, at templates/list-optins.php

138 lines 6.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @var string $domain
4 * @var array<forge12\contactform7\CF7DoubleOptIn\OptIn> $listOfOptIns
5 * @var int $numberOfPages
6 * @var int $currentPage
7 * @var string $slug
8 */
9 ?>
10 <form action="" method="get">
11 <input type="hidden" name="page" value="<?php esc_attr_e(sanitize_text_field($_GET['page'])); ?>"/>
12 <input type="hidden" name="pageNum" value="<?php esc_attr_e($currentPage); ?>"/>
13 <?php if (isset($_GET['id'])): ?>
14 <input type="hidden" name="id" value="<?php esc_attr_e((int)$_GET['id']); ?>"/>
15 <?php endif; ?>
16 <ul class="ui-table-filter">
17 <?php do_action('f12_cf7_doubleoptin_ui_table_filter'); ?>
18 </ul>
19 </form>
20
21 <form action="" method="post">
22 <table>
23 <tr>
24 <th></th>
25 <th>
26 <?php _e('ID', 'double-opt-in'); ?>
27 </th>
28 <th>
29 <?php _e('Hash', 'double-opt-in'); ?>
30 </th>
31 <th>
32 <?php _e('E-Mail', 'double-opt-in'); ?>
33 </th>
34 <th>
35 <?php _e('Category', 'double-opt-in'); ?>
36 </th>
37 <th>
38 <?php _e('Form ID', 'double-opt-in'); ?>
39 </th>
40 <th>
41 <?php _e('Confirmed ? ', 'double-opt-in'); ?>
42 </th>
43 <th>
44 <?php _e('Registration Date', 'double-opt-in'); ?>
45 </th>
46 </tr>
47 <?php foreach ($listOfOptIns as $OptIn/** @var OptIn $OptIn */) : ?>
48 <tr>
49 <td>
50 <input type="checkbox" name="optin-id[]" value="<?php esc_attr_e($OptIn->get_id()); ?>"/>
51 </td>
52 <td>
53 <div class="f12-cf7-details" data-hash="<?php esc_attr_e($OptIn->get_hash()); ?>">
54 <?php echo esc_html($OptIn->get_id()); ?>
55 </div>
56 </td>
57 <td>
58 <a href="javascript:void(0)" class="f12-cf7-details"
59 data-hash="<?php esc_attr_e($OptIn->get_hash()); ?>"
60 title="<?php _e('Show details', 'double-opt-in'); ?>"><?php esc_attr_e($OptIn->get_hash()); ?></a>
61 <div class="on-hover">
62 <a href="<?php echo admin_url('admin.php?page=f12-cf7-doubleoptin_optin_view&hash=' . esc_attr($OptIn->get_hash())); ?>"><?php _e('Details', 'double-opt-in'); ?></a>
63 </div>
64 </td>
65 <td>
66 <div class="f12-cf7-details" >
67 <?php echo esc_html($OptIn->get_email()); ?>
68 </div>
69 </td>
70 <td>
71 <?php
72 if (0 === $OptIn->get_category()) {
73 echo '---';
74 } else {
75 $Category = \forge12\contactform7\CF7DoubleOptIn\Category::get_by_id($OptIn->get_category());
76
77 if (null === $Category) {
78 echo '---';
79 } else {
80 $link = admin_url('admin.php') . '?page=f12-cf7-doubleoptin_categories_view&id=' . esc_attr($Category->get_id());
81 echo '<a href="' . esc_url_raw($link) . '">' . esc_attr($Category->get_name()) . '</a>';
82 }
83 }
84 ?>
85 </td>
86 <td>
87 <?php
88 $form = '';
89 if ($OptIn->isType('cf7')) {
90 $formObject = \WPCF7_ContactForm::get_instance($OptIn->get_cf_form_id());
91 if ($formObject) {
92 $form = '<a href="admin.php?page=wpcf7&post=' . esc_attr($formObject->id()) . '&action=edit" target="_blank" rel="noopener noreferrer"> ' . esc_html($formObject->title()) . '</a>';
93 }
94 }
95 if ($OptIn->isType('avada')) {
96 $formObject = get_post($OptIn->get_cf_form_id());
97 if ($formObject) {
98 $form = '<a href="admin.php?page=wpcf7&post=' . esc_attr($formObject->ID) . '&action=edit" target="_blank" rel="noopener noreferrer"> ' . esc_html($formObject->post_title) . '</a>';
99 }
100 }
101 echo wp_kses($form, array('a' => array('href' => array(), 'target' => '', 'rel' => '')));
102 ?>
103 </td>
104 <td>
105 <?php if($OptIn->is_confirmed()):?>
106 <div class="dashicons dashicons-yes"></div>
107 <?php else:?>
108 <div class="dashicons dashicons-no"></div>
109 <?php endif;?>
110
111 <?php ($OptIn->is_confirmed()) ? _e('Yes', 'double-opt-in') : _e('No', 'double-opt-in'); ?>
112 </td>
113 <td>
114 <?php
115 /**
116 * Compatibility < 1.3.2
117 */
118 echo esc_html($OptIn->get_createtime('formatted'));
119 ?>
120 </td>
121 </tr>
122 <?php endforeach; ?>
123 </table>
124 <ul class="ui-table-options">
125 <?php do_action('f12_cf7_doubleoptin_ui_table_options'); ?>
126 <?php wp_nonce_field('f12_cf7_doubleoptin_ui_table_options_action', 'f12_cf7_doubleoptin_ui_table_options_nonce'); ?>
127 </ul>
128 </form>
129 <div class="tablenav-pages">
130 <?php for ($i = 1; $i <= $numberOfPages; $i++):
131 $link = apply_filters('f12_cf7_doubleoptin_pagination_link', admin_url('admin.php'), array('page' => sanitize_text_field($_GET['page']), 'pageNum' => $i));
132 ?>
133 <a href="<?php echo esc_url($link); ?>"
134 class="button <?php echo ($currentPage) == $i ? 'active' : ''; ?>">
135 <?php echo esc_html($i); ?>
136 </a>
137 <?php endfor; ?>
138 </div>