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:
@@ -8,6 +8,7 @@ use LIT\MCP\Abilities\Errors;
|
||||
use LIT\MCP\Abilities\FollowUp;
|
||||
use LIT\MCP\Abilities\Rollback;
|
||||
use LIT\MCP\Abilities\WriteFailed;
|
||||
use LIT\MCP\Integrations\Divi\ThemeBuilder\DiviThemeBuilder;
|
||||
use LIT\MCP\Integrations\WordPress\PostGuard;
|
||||
use LIT\MCP\Integrations\WordPress\RevisionPoint;
|
||||
use RuntimeException;
|
||||
@@ -106,16 +107,12 @@ class DiviSaver
|
||||
}
|
||||
FollowUp::run(
|
||||
static function () use ($postId, $scope): void {
|
||||
if (! class_exists('ET_Core_PageResource')) {
|
||||
return;
|
||||
if (class_exists('ET_Core_PageResource')) {
|
||||
\ET_Core_PageResource::remove_static_resources($postId, 'all', true);
|
||||
}
|
||||
\ET_Core_PageResource::remove_static_resources($postId, 'all', true);
|
||||
// A global library entry is part of every page that shows it (spec §5.6 step 5).
|
||||
if ($scope->clearsSiteCss()) {
|
||||
\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');
|
||||
}
|
||||
DiviThemeBuilder::clearSiteCaches();
|
||||
}
|
||||
},
|
||||
'divi static css',
|
||||
|
||||
Reference in New Issue
Block a user