Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion wp-content/themes/3w-2025/inc/redirects.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Loading