Support for WP Rocket #2

Merged
ogrecooper merged 5 commits from wp-rocket into main 2026-04-28 13:27:51 +00:00
2 changed files with 34 additions and 0 deletions
Showing only changes of commit 7d6c38f86c - Show all commits
+33
View File
@@ -0,0 +1,33 @@
<?php
/**
* @package ogre-suspension
* @author cleverogre
* @version 1.0.0
* @since 1.0.0
*/
namespace Ogre\Suspension\Integration;
use Ogre\Singleton;
use Ogre\Suspension as Plugin;
defined('ABSPATH') || exit;
final class WPRocket {
use Singleton;
protected function __construct() {
add_filter('do_rocket_generate_caching_files', '__return_false');
register_activation_hook(Plugin::get_file(), [$this, 'clean_cache']);
}
public function clean_cache() {
if (!function_exists('rocket_clean_domain')) return false;
// Purge entire WP Rocket cache
rocket_clean_domain();
}
}
WPRocket::instance();
+1
View File
@@ -26,6 +26,7 @@ final class Suspension extends Plugin {
'inc/class-redirect.php', 'inc/class-redirect.php',
'inc/class-admin.php', 'inc/class-admin.php',
'inc/class-template.php', 'inc/class-template.php',
'inc/integrations/class-wp-rocket.php',
]); ]);
} }