| 1 |
<?php |
| 2 |
/** |
| 3 |
* Code Minification Cache Tab View |
| 4 |
* |
| 5 |
* @package Search Atlas SEO |
| 6 |
* @copyright Copyright (C) 2021-2025, Search Atlas Group - support@searchatlas.com |
| 7 |
* @since 2.5.23 |
| 8 |
*/ |
| 9 |
|
| 10 |
if (!defined('WPINC')) { |
| 11 |
die; |
| 12 |
} |
| 13 |
|
| 14 |
$cache_stats = Metasync_Minification_Cache::get_cache_stats(); |
| 15 |
?> |
| 16 |
<div class="metasync-code-min-container"> |
| 17 |
<div class="metasync-code-min-main"> |
| 18 |
|
| 19 |
<!-- Cache Statistics --> |
| 20 |
<div class="metasync-card"> |
| 21 |
<div class="metasync-card-header"> |
| 22 |
<div class="metasync-card-title-group"> |
| 23 |
<h2><?php esc_html_e('Cache Statistics', 'metasync'); ?></h2> |
| 24 |
<span class="metasync-card-subtitle"><?php esc_html_e('Overview of minified assets stored in cache', 'metasync'); ?></span> |
| 25 |
</div> |
| 26 |
</div> |
| 27 |
<div class="metasync-card-body"> |
| 28 |
<div class="metasync-cache-stats-grid"> |
| 29 |
<div class="metasync-cache-stat"> |
| 30 |
<span class="metasync-cache-stat-value" id="cache-total-files"><?php echo esc_html($cache_stats['total_files']); ?></span> |
| 31 |
<span class="metasync-cache-stat-label"><?php esc_html_e('Total Files', 'metasync'); ?></span> |
| 32 |
</div> |
| 33 |
<div class="metasync-cache-stat"> |
| 34 |
<span class="metasync-cache-stat-value" id="cache-total-size"><?php echo esc_html(size_format($cache_stats['total_size'])); ?></span> |
| 35 |
<span class="metasync-cache-stat-label"><?php esc_html_e('Total Size', 'metasync'); ?></span> |
| 36 |
</div> |
| 37 |
<div class="metasync-cache-stat"> |
| 38 |
<span class="metasync-cache-stat-value" id="cache-css-files"><?php echo esc_html($cache_stats['css_files']); ?></span> |
| 39 |
<span class="metasync-cache-stat-label"><?php esc_html_e('CSS Files', 'metasync'); ?></span> |
| 40 |
</div> |
| 41 |
<div class="metasync-cache-stat"> |
| 42 |
<span class="metasync-cache-stat-value" id="cache-js-files"><?php echo esc_html($cache_stats['js_files']); ?></span> |
| 43 |
<span class="metasync-cache-stat-label"><?php esc_html_e('JS Files', 'metasync'); ?></span> |
| 44 |
</div> |
| 45 |
</div> |
| 46 |
|
| 47 |
<div class="metasync-cache-actions"> |
| 48 |
<button type="button" class="button button-secondary" id="metasync-purge-minification-cache"> |
| 49 |
<span class="dashicons dashicons-trash" style="margin-top: 4px;"></span> |
| 50 |
<?php esc_html_e('Purge Minification Cache', 'metasync'); ?> |
| 51 |
</button> |
| 52 |
<?php Metasync::render_tooltip_icon('code_min_purge_cache', 'Clears the minified CSS/JS cache so the next page load rebuilds it fresh. Safe to run anytime — it doesn\'t delete your settings.'); ?> |
| 53 |
<span class="metasync-cache-purge-status" id="cache-purge-status"></span> |
| 54 |
</div> |
| 55 |
|
| 56 |
<p class="metasync-field-description" style="margin-top: 12px;"> |
| 57 |
<?php printf( |
| 58 |
esc_html__('Cache directory: %s', 'metasync'), |
| 59 |
'<code>' . esc_html(Metasync_Minification_Cache::get_cache_dir()) . '</code>' |
| 60 |
); ?> |
| 61 |
</p> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
|
| 65 |
</div> |
| 66 |
</div> |
| 67 |
|