PluginProbe
Docket Cache – Object Cache Accelerator / 26.04.03
Docket Cache – Object Cache Accelerator v26.04.03
26.04.05 trunk 22.07.01 22.07.02 22.07.03 22.07.04 22.07.05 23.08.01 23.08.02 24.07.01 24.07.02 24.07.03 24.07.04 24.07.05 24.07.06 24.07.07 26.04.03 26.04.04
docket-cache / includes / admin / resource.php

resource.php in Docket Cache – Object Cache Accelerator 26.04.03, at includes/admin/resource.php

168 lines 8.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Docket Cache.
4 *
5 * @author Nawawi Jamili
6 * @license MIT
7 *
8 * @see https://github.com/nawawi/docket-cache
9 */
10
11 namespace Nawawi\DocketCache;
12
13 \defined('ABSPATH') || exit;
14 ?>
15 <?php $this->tab_title(esc_html__('Actions', 'docket-cache')); ?>
16 <div class="qact">
17 <div class="cmd">
18 <h4><?php esc_html_e('Cleanup Post', 'docket-cache'); ?></h4>
19 <p>
20 <?php esc_html_e('Cleanup Revisions, Auto Draft, Trash Bin.', 'docket-cache'); ?>
21 </p>
22 <?php
23 $sites = $this->pt->get_network_sites();
24 if (is_multisite() && !empty($sites) && \is_array($sites) && \count($sites) > 1) :
25 $current_siteid = (int) $this->pt->get_current_select_siteid();
26 ?>
27 <label for="siteid"><?php esc_html_e('For Site:', 'docket-cache'); ?></label>
28 <select id="siteid">
29 <option value='0' <?php echo 0 === $current_siteid ? ' selected' : ''; ?>><?php esc_html_e('all', 'docket-cache'); ?></option>
30 <?php
31 foreach ($sites as $site) {
32 $site_id = (int) $site['id'];
33 $site_url = $site['url'];
34 $v = nwdcx_noscheme($site_url);
35 $selected = $site_id > 0 && $site_id === $current_siteid ? ' selected' : '';
36 echo '<option value="'.$site_id.'"'.$selected.'>'.$v.'</option>';
37 }
38 ?>
39 </select>
40 <?php endif; ?>
41 <a href="<?php echo $this->pt->action_query('cleanuppost', ['idx' => 'config']); ?>" class="button button-primary button-large btx-spinner btx-cleanuppost"><?php esc_html_e('Cleanup Post', 'docket-cache'); ?></a>
42
43 <?php if ($this->vcf()->is_dctrue('FLUSHACTION')) : ?>
44 <?php if ($this->vcf()->is_dctrue('ADVCPOST')) : ?>
45 <hr>
46 <h4><?php esc_html_e('Advanced Post Cache Files', 'docket-cache'); ?></h4>
47 <p>
48 <?php esc_html_e('Remove Advanced Post Cache files.', 'docket-cache'); ?>
49 </p>
50 <a href="<?php echo $this->pt->action_query('flush-advcpost', ['idx' => 'config']); ?>" class="button button-primary button-large btx-spinner"><?php esc_html_e('Flush Advanced Post Cache', 'docket-cache'); ?></a>
51 <?php endif; ?>
52
53 <?php if ($this->vcf()->is_dctrue('PRECACHE')) : ?>
54 <hr>
55 <h4><?php esc_html_e('Object Precache Files', 'docket-cache'); ?></h4>
56 <p>
57 <?php esc_html_e('Remove Object Cache Precaching files.', 'docket-cache'); ?>
58 </p>
59 <a href="<?php echo $this->pt->action_query('flush-ocprecache', ['idx' => 'config']); ?>" class="button button-primary button-large btx-spinner"><?php esc_html_e('Flush Object Precache', 'docket-cache'); ?></a>
60 <?php endif; ?>
61
62 <hr>
63 <h4><?php esc_html_e('Transient Cache Files', 'docket-cache'); ?></h4>
64 <p>
65 <?php esc_html_e('Remove transient cache files.', 'docket-cache'); ?>
66 </p>
67 <a href="<?php echo $this->pt->action_query('flush-transient', ['idx' => 'config']); ?>" class="button button-primary button-large btx-spinner"><?php esc_html_e('Flush Transient Cache', 'docket-cache'); ?></a>
68
69 <?php if ($this->vcf()->is_dctrue('MENUCACHE')) : ?>
70 <hr>
71 <h4><?php esc_html_e('Menu Cache Files', 'docket-cache'); ?></h4>
72 <p>
73 <?php esc_html_e('Remove menu cache files.', 'docket-cache'); ?>
74 </p>
75 <a href="<?php echo $this->pt->action_query('flush-menucache', ['idx' => 'config']); ?>" class="button button-primary button-large btx-spinner"><?php esc_html_e('Flush Menu Cache', 'docket-cache'); ?></a>
76 <?php endif; ?>
77
78 <?php if ($this->vcf()->is_dctrue('MOCACHE')) : ?>
79 <hr>
80 <h4><?php esc_html_e('Translation Cache Files', 'docket-cache'); ?></h4>
81 <p>
82 <?php esc_html_e('Remove translation cache files.', 'docket-cache'); ?>
83 </p>
84 <a href="<?php echo $this->pt->action_query('flush-mocache', ['idx' => 'config']); ?>" class="button button-primary button-large btx-spinner"><?php esc_html_e('Flush Translation Cache', 'docket-cache'); ?></a>
85 <?php endif; ?>
86
87 <?php endif; // flushaction?>
88
89 <?php if ($this->vcf()->is_dctrue('CONFIGACTION')) : ?>
90 <hr>
91 <h4><?php esc_html_e('Export Settings', 'docket-cache'); ?></h4>
92 <p>
93 <?php esc_html_e('Download current configuration as a JSON file.', 'docket-cache'); ?>
94 </p>
95 <a href="<?php echo $this->pt->action_query('export-config', ['idx' => 'config']); ?>" class="button button-primary button-large"><?php esc_html_e('Export Settings', 'docket-cache'); ?></a>
96
97 <hr>
98 <h4><?php esc_html_e('Import Settings', 'docket-cache'); ?></h4>
99 <p>
100 <?php esc_html_e('Upload a previously exported JSON configuration file.', 'docket-cache'); ?>
101 </p>
102 <form method="post" action="<?php echo $this->pt->action_query('import-config', ['idx' => 'config']); ?>" enctype="multipart/form-data">
103 <input type="file" name="dcimportfile" accept=".json" required>
104 <p>
105 <button type="submit" class="button button-primary button-large"><?php esc_html_e('Import Settings', 'docket-cache'); ?></button>
106 </p>
107 </form>
108 <?php endif; // configaction?>
109
110 <hr>
111 <h4><?php esc_html_e('Config Reset', 'docket-cache'); ?></h4>
112 <p>
113 <?php esc_html_e('Reset all configuration to default.', 'docket-cache'); ?>
114 </p>
115 <a href="<?php echo $this->pt->action_query('configreset', ['idx' => 'config']); ?>" class="button button-primary button-large btx-spinner"><?php esc_html_e('Reset to default', 'docket-cache'); ?></a>
116
117 <?php if (is_main_network()) : ?>
118 <hr>
119 <h4><?php esc_html_e('Runtime Code', 'docket-cache'); ?></h4>
120 <p>
121 <?php esc_html_e('Code to handles WordPress constants.', 'docket-cache'); ?>
122 </p>
123 <a href="
124 <?php
125 $is_install = WpConfig::is_runtimefalse();
126 $act = $is_install ? esc_html__('Install Runtime Code', 'docket-cache') : esc_html__('Update Runtime Code', 'docket-cache');
127 $actc = $is_install ? 'button-primary' : 'button-secondary';
128 echo $this->pt->get_page(
129 [
130 'idx' => 'config',
131 'adx' => 'rtcnf',
132 'st' => time(),
133 ]
134 );
135 ?>
136 " class="button <?php echo $actc; ?> button-large btx-spinner"><?php echo $act; ?></a>
137 <?php endif; // is_main_network?>
138
139 </div>
140 </div>
141 <?php $this->tab_title(esc_html__('Resources', 'docket-cache')); ?>
142 <div class="postbox">
143 <div class="inside">
144 <div>
145 <p>
146 <strong><?php esc_html_e('DOCUMENTATION', 'docket-cache'); ?></strong><br class="break">
147 <?php esc_html_e('To adjust the plugin behaviour and manage through a command line.', 'docket-cache'); ?>
148 <a href="https://docs.docketcache.com/?utm_source=wp-plugins&utm_campaign=docs-uri&utm_medium=dc-config" class="button button-secondary button-small bt-cx" rel="noopener" target="new"><?php esc_html_e('Documentation', 'docket-cache'); ?></a>
149 </p>
150 <hr>
151 <p>
152 <strong><?php esc_html_e('FEEDBACK', 'docket-cache'); ?></strong><br class="break">
153 <?php esc_html_e('Write a review of your experience using this plugin.', 'docket-cache'); ?>
154 <a href="https://docketcache.com/feedback/?utm_source=wp-plugins&utm_campaign=reviews-uri&utm_medium=dc-config" class="button button-secondary button-small bt-cx" rel="noopener" target="new"><?php esc_html_e('Submit Review', 'docket-cache'); ?></a>
155 </p>
156 <?php if (!apply_filters('docketcache/filter/view/nosponsor', false)) : ?>
157 <hr>
158 <p>
159 <strong><?php esc_html_e('SPONSOR', 'docket-cache'); ?></strong><br class="break">
160 <?php esc_html_e('Fund Docket Cache one-off or recurring payment to support our open-source development efforts.', 'docket-cache'); ?>
161 <a href="https://docketcache.com/sponsorship/?utm_source=wp-plugins&utm_campaign=sponsor-uri&utm_medium=dc-config" class="button button-secondary button-small bt-cx" rel="noopener" target="new"><?php esc_html_e('Become Sponsor', 'docket-cache'); ?></a>
162 </p>
163 <?php endif; ?>
164 <?php do_action('docketcache/action/view/resources'); ?>
165 </div>
166 </div>
167 </div>
168