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:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPUnit bootstrap file.
|
||||
*
|
||||
* @package WP_Recache
|
||||
*/
|
||||
|
||||
$_tests_dir = getenv('WP_TESTS_DIR');
|
||||
|
||||
if (!$_tests_dir) {
|
||||
$_tests_dir = rtrim(sys_get_temp_dir(), '/\\') . '/wordpress-tests-lib';
|
||||
}
|
||||
|
||||
if (!file_exists("{$_tests_dir}/includes/functions.php")) {
|
||||
echo "Could not find {$_tests_dir}/includes/functions.php\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once "{$_tests_dir}/includes/functions.php";
|
||||
|
||||
/**
|
||||
* Load the plugin.
|
||||
*/
|
||||
function _load_plugin() {
|
||||
require dirname(__DIR__, 2) . '/wp-recache.php';
|
||||
}
|
||||
|
||||
tests_add_filter('muplugins_loaded', '_load_plugin');
|
||||
|
||||
require "{$_tests_dir}/includes/bootstrap.php";
|
||||
Reference in New Issue
Block a user