feat: implement Phase 1 - Core Page Cache and Admin Settings UI

Implement the core page caching functionality and admin settings interface
for WP Recache plugin. This includes:

- Plugin bootstrap with activation/deactivation handlers
- Admin settings page with tabbed interface (Cache, Optimization, Advanced)
- Admin bar integration for quick cache purging
- Core page cache using output buffering
- Cache file management with mobile device separation
- Cache purge on post update/comment
- Default URL exclusions (cart, checkout, account)
- Cache statistics display
- PHPUnit test suite setup
- Docker-based development environment
- PHPStan configuration for static analysis

References:
- Closes #1 (Core Page Cache)
- Closes #8 (Admin Settings UI)
This commit is contained in:
2026-09-13 09:56:35 +02:00
parent 88a0531d90
commit 33099591f5
18 changed files with 1452 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
/**
* Plugin deactivation handler.
*
* @package WP_Recache
*/
defined('ABSPATH') || exit;
class WP_Recache_Deactivator {
/**
* Run deactivation routines.
*/
public static function deactivate() {
self::remove_advanced_cache();
self::flush_rewrite_rules();
}
/**
* Remove advanced-cache.php drop-in.
*/
private static function remove_advanced_cache() {
$advanced_cache = WP_CONTENT_DIR . '/advanced-cache.php';
if (file_exists($advanced_cache)) {
unlink($advanced_cache);
}
}
/**
* Flush rewrite rules.
*/
private static function flush_rewrite_rules() {
flush_rewrite_rules();
}
}