| 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 |
$ocdisabled = 2 === $this->info->status_code ? ' onclick="return false;" disabled' : ''; |
| 15 |
$opdisabled = 0 === $this->info->opcache_code ? ' onclick="return false;" disabled' : ''; |
| 16 |
?> |
| 17 |
<?php $this->tab_title(esc_html__('Actions', 'docket-cache')); ?> |
| 18 |
<div class="qact"> |
| 19 |
<div class="cmd"> |
| 20 |
<h4><?php esc_html_e('Object Cache Files', 'docket-cache'); ?></h4> |
| 21 |
<p> |
| 22 |
<?php esc_html_e('Remove all cache files.', 'docket-cache'); ?> |
| 23 |
</p> |
| 24 |
<a href="<?php echo $this->pt->action_query('flush-occache'); ?>" class="button button-primary button-large btx-spinner"><?php esc_html_e('Flush Object Cache', 'docket-cache'); ?></a> |
| 25 |
<hr> |
| 26 |
|
| 27 |
<h4><?php esc_html_e('Zend OPcache', 'docket-cache'); ?></h4> |
| 28 |
<p> |
| 29 |
<?php esc_html_e('Reset OPcache usage.', 'docket-cache'); ?> |
| 30 |
</p> |
| 31 |
<a href="<?php echo $this->pt->action_query('flush-opcache'); ?>" class="button button-primary button-large btx-spinner" <?php echo $opdisabled; ?>><?php esc_html_e('Flush OPcache', 'docket-cache'); ?></a> |
| 32 |
<hr> |
| 33 |
<h4><?php esc_html_e('Object Cache Drop-In', 'docket-cache'); ?></h4> |
| 34 |
<p> |
| 35 |
<?php esc_html_e('Enable / Disable Drop-In usage.', 'docket-cache'); ?> |
| 36 |
</p> |
| 37 |
<?php if ($this->info->dropin_isalt && !$this->info->dropin_wp_isexist) : ?> |
| 38 |
<p class="text-red"> |
| 39 |
<?php esc_html_e('Drop-In Wrapper not available.', 'docket-cache'); ?> |
| 40 |
</p> |
| 41 |
<?php endif; ?> |
| 42 |
|
| 43 |
<?php if ($this->is_dropin_validate() && $this->is_dropin_multinet()) : ?> |
| 44 |
<a href="<?php echo $this->pt->action_query('disable-occache'); ?>" class="button button-primary button-large btx-spinner" <?php echo $ocdisabled; ?>><?php esc_html_e('Disable Object Cache', 'docket-cache'); ?></a> |
| 45 |
<?php else : ?> |
| 46 |
<a href="<?php echo $this->pt->action_query('enable-occache'); ?>" class="button button-secondary button-large btx-spinner" <?php echo $ocdisabled; ?>><?php esc_html_e('Enable Object Cache', 'docket-cache'); ?></a> |
| 47 |
<?php endif; ?> |
| 48 |
|
| 49 |
<?php if ($this->vcf()->is_dctrue('GCACTION')) : ?> |
| 50 |
<hr> |
| 51 |
|
| 52 |
<h4><?php esc_html_e('Garbage Collector', 'docket-cache'); ?></h4> |
| 53 |
<p> |
| 54 |
<?php esc_html_e('Execute the Garbage Collector Task.', 'docket-cache'); ?> |
| 55 |
</p> |
| 56 |
<a href="<?php echo $this->pt->action_query('rungc'); ?>" class="button button-primary button-large btx-spinner"><?php esc_html_e('Run Garbage Collector', 'docket-cache'); ?></a> |
| 57 |
<?php endif; ?> |
| 58 |
|
| 59 |
</div> |
| 60 |
</div> |
| 61 |
|