diff --git a/wp-content/themes/3w-2025/inc/redirects.php b/wp-content/themes/3w-2025/inc/redirects.php index 99a98b6..3df08d7 100644 --- a/wp-content/themes/3w-2025/inc/redirects.php +++ b/wp-content/themes/3w-2025/inc/redirects.php @@ -66,13 +66,22 @@ function () { /** * Purge full-page cache once when the redirect map changes. + * + * The LiteSpeed class API is not present in every plugin version, so the + * documented action hooks are used first and the class is kept as a fallback. */ add_action( 'init', function () { - $cache_version = '2026-11-23-2'; + $cache_version = '2026-11-24-1'; if ( get_option( 'threew_consolidation_cache_version' ) === $cache_version ) { return; } + do_action( 'litespeed_purge_all' ); + + foreach ( array_keys( threew_consolidation_redirects() ) as $path ) { + do_action( 'litespeed_purge_url', home_url( $path ) ); + } + if ( class_exists( 'LiteSpeed_Cache_API' ) ) { LiteSpeed_Cache_API::purge_all(); }