PluginProbe
Age Gate / 3.7.3
Age Gate v3.7.3
3.7.3 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 All 113 releases
age-gate / src / Resources / views / admin / tools.php

tools.php in Age Gate 3.7.3, at src/Resources/views/admin/tools.php

90 lines 4.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php $this->layout('default'); ?>
2
3
4
5 <?php $this->start('additional') ?>
6
7 <?php if (current_user_can($export_capability) || current_user_can($import_capability)) : ?>
8 <hr />
9 <h2><?php echo esc_html(__('Import/Export', 'age-gate')) ?></h2>
10 <div class="ag-row">
11 <?php if (current_user_can($export_capability)) : ?>
12 <div class="ag-col w-1/2">
13 <h3><?php echo esc_html(__('Export', 'age-gate')) ?></h3>
14
15 <form name="ag-import" action="<?php echo esc_url(admin_url('admin-post.php')) ?>" method="post">
16 <input type="hidden" name="action" value="age_gate_export" />
17 <table class="form-table">
18 <tr>
19 <th><?php echo esc_html(__('Select all', 'age-gate')) ?></th>
20 <td>
21 <fieldset class="ag-fields ag-fields--checkbox">
22 <?php $this->insert('partials/fields/checkbox', ['name' => 'all', 'field' => ['type' => 'checkbox']]); ?>
23 </fieldset>
24 </td>
25 </tr>
26 <?php foreach ($export_options as $label => $option) : ?>
27 <tr>
28 <th><?php echo esc_html(ucfirst($label)) ?></th>
29 <td>
30 <fieldset class="ag-fields ag-fields--checkbox">
31 <?php $this->insert('partials/fields/checkbox', ['name' => $label, 'field' => ['type' => 'checkbox']]); ?>
32 </fieldset>
33 </td>
34 </tr>
35 <?php endforeach; ?>
36 </table>
37 <?php wp_nonce_field('ag_export', 'ag_export', true, true) ?>
38 <?php submit_button('Export', 'primary', 'submit_export') ?>
39 </form>
40 </div>
41 <?php endif; ?>
42 <?php if (current_user_can($import_capability)) : ?>
43 <div class="ag-col w-1/2">
44 <h3><?php echo esc_html(__('Import', 'age-gate')) ?></h3>
45
46 <form name="ag-import" action="<?php echo esc_url(admin_url('admin-post.php')) ?>" method="post" enctype="multipart/form-data">
47 <input type="hidden" name="action" value="age_gate_import" />
48 <label class="ag-file">
49 <input type="file" id="file" name="ag_settings_import" accept=".json" aria-label="File browser example">
50 <span class="ag-file-custom" data-text="Choose file..."></span>
51 </label>
52 <?php wp_nonce_field('ag_import', 'ag_import', true, true) ?>
53 <?php submit_button('Import', 'primary', 'submit_import') ?>
54 </form>
55 </div>
56 <?php endif; ?>
57 </div>
58 <?php endif; ?>
59 <?php if (current_user_can($reset_capability)) : ?>
60 <hr />
61
62 <h3><?php echo esc_html(__('Reset Age Gate', 'age-gate')) ?></h3>
63
64 <div class="ag-row">
65 <div class="ag-col w-1/2">
66 <p><?php echo esc_html(__('Restore Age Gate to default settings.', 'age-gate')) ?></p>
67 <p><b><?php echo esc_html(__('This cannot be undone, so export your settings first', 'age-gate')) ?></b></p>
68
69 <form method="post" action="<?php echo esc_url(admin_url('admin-post.php')) ?>" class="ag-form__reset">
70 <?php wp_nonce_field('ag_reset_settings', 'ag_reset_settings', true, true) ?>
71 <input type="hidden" name="action" value="age_gate_reset">
72 <input type="password" name="pwd" placeholder="<?php echo esc_attr(__('Enter your password', 'age-gate')) ?>" />
73 <button type="submit" class="button button--remove"><?php echo esc_html(__('Reset', 'age-gate')) ?></button>
74 </form>
75 </div>
76 <div class="ag-col w-1/2">
77 <p><?php echo esc_html(__('Clear all meta data.', 'age-gate')) ?></p>
78 <p><b><?php echo esc_html(__('Remove any custom ages, bypass and restrict settings. This cannot be undone.', 'age-gate')) ?></b></p>
79
80 <form method="post" action="<?php echo esc_url(admin_url('admin-post.php')) ?>" class="ag-form__reset">
81 <?php wp_nonce_field('ag_reset_post', 'ag_reset_post', true, true) ?>
82 <input type="hidden" name="action" value="age_gate_reset_post">
83 <input type="password" name="pwd" placeholder="<?php echo esc_attr(__('Enter your password', 'age-gate')) ?>" />
84 <button type="submit" class="button button--remove"><?php echo esc_html(__('Reset', 'age-gate')) ?></button>
85 </form>
86 </div>
87 </div>
88 <?php endif; ?>
89 <?php $this->stop() ?>
90