| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: atec Cache Info |
| 4 |
* Plugin URI: https://atecplugins.com/ |
| 5 |
* Description: Show all system caches, status and statistics (OPcache, WP-Object-Cache, JIT, APCu, Memcached, Redis, SQLite-Object-Cache). |
| 6 |
* Version: 1.8.38 |
| 7 |
* Requires at least: 4.9 |
| 8 |
* Tested up to: 7.0 |
| 9 |
* Tested up to PHP: 8.4.12 |
| 10 |
* Requires PHP: 7.4 |
| 11 |
* Requires CP: 1.7 |
| 12 |
* Premium URI: https://atecplugins.com |
| 13 |
* Author: Chris Ahrweiler � |
| 14 |
atecplugins.com |
| 15 |
* Author URI: https://atec-systems.com/ |
| 16 |
* License: GPL2 |
| 17 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 18 |
* Text Domain: atec-cache-info |
| 19 |
*/ |
| 20 |
|
| 21 |
defined('ABSPATH') || exit; |
| 22 |
defined('ATEC_LOADER') || require __DIR__ . '/includes/ATEC/LOADER.php'; |
| 23 |
|
| 24 |
use ATEC\INIT; |
| 25 |
|
| 26 |
INIT::set_version('wpci', '1.8.38'); |
| 27 |
|
| 28 |
if (INIT::is_real_admin()) |
| 29 |
{ |
| 30 |
INIT::register_activation_deactivation_hook(__FILE__, 1, 0, 'wpci'); |
| 31 |
add_action('admin_menu', fn() => INIT::menu(__DIR__, 'wpci', 'Cache Info')); |
| 32 |
add_action('admin_init', function () |
| 33 |
{ |
| 34 |
if (!INIT::current_user_can('admin')) return; |
| 35 |
|
| 36 |
if (INIT::admin_bar_option('wpci')) \ATEC\MEMORY::add_admin_bar_memory(); |
| 37 |
|
| 38 |
$query = INIT::query(); |
| 39 |
if (strpos($query, 'atec_wpci') !== false) |
| 40 |
{ |
| 41 |
if (strpos($query, 'action=admin_bar') !== false) INIT::set_admin_bar_option('wpci'); |
| 42 |
\ATEC\TRANSLATE::load_pll(__DIR__, 'cache-info'); |
| 43 |
} |
| 44 |
}); |
| 45 |
} |
| 46 |
?> |