refactor: one site-wide Divi cache clear and one compatibility row (review M-1, M-2)
DiviSaver's site-wide scopes and the Theme Builder tools now share DiviThemeBuilder::clearSiteCaches(), which clears the Theme Builder cache even when ET_Core_PageResource is missing. lit-site-status no longer lists et_theme_builder_clear_wp_cache twice: the Theme Builder functions row covers it, and the post-type row uses DiviThemeBuilder::postTypes(). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -341,12 +341,21 @@ class DiviThemeBuilder
|
||||
/** Divi's Theme Builder cache and every static CSS file (spec §5.6 step 5; api.php:249-254). */
|
||||
public function clearCaches(): void
|
||||
{
|
||||
if (function_exists('et_theme_builder_clear_wp_cache')) {
|
||||
et_theme_builder_clear_wp_cache('all');
|
||||
}
|
||||
self::clearSiteCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* The site-wide clear shared by the Theme Builder tools and DiviSaver's site-wide scopes (review M-1): every
|
||||
* static CSS file and Divi's Theme Builder cache, each when Divi provides it.
|
||||
*/
|
||||
public static function clearSiteCaches(): void
|
||||
{
|
||||
if (class_exists('ET_Core_PageResource')) {
|
||||
\ET_Core_PageResource::remove_static_resources('all', 'all', true);
|
||||
}
|
||||
if (function_exists('et_theme_builder_clear_wp_cache')) {
|
||||
et_theme_builder_clear_wp_cache('all');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user