feat: Divi tools edit Theme Builder layouts; visible layouts need confirm
TB layouts load through ThemeBuilderAccess (P12), live layouts (attached + enabled, Q8) need a dry run and confirm (Q9) and get the shared restore point of VisibleEdits, extracted from GlobalEdits (Q2: backup when revisions are off, P9 refusals, P14 naming). divi/post-content only in body layouts (F22), also for nested stored nodes. SaveScope::ThemeBuilderLayout sets Divi flags and clears site CSS + TB cache. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -24,6 +24,7 @@ use LIT\MCP\Guides\InstructionsBuilder;
|
||||
use LIT\MCP\Integrations\Core\CoreIntegration;
|
||||
use LIT\MCP\Integrations\Divi\DiviIntegration;
|
||||
use LIT\MCP\Integrations\Divi\Library\LibraryAccess;
|
||||
use LIT\MCP\Integrations\Divi\ThemeBuilder\ThemeBuilderAccess;
|
||||
use LIT\MCP\Integrations\IntegrationRegistry;
|
||||
use LIT\MCP\Integrations\Media\MediaIntegration;
|
||||
use LIT\MCP\Integrations\Pods\PodsFieldSource;
|
||||
@@ -95,13 +96,22 @@ final class Plugin
|
||||
&& $policy instanceof ExposurePolicy
|
||||
&& $policy->allows('lit/library-insert', $registry->abilities());
|
||||
};
|
||||
// Etappe 3b: the group "Divi Theme Builder" gates TB layouts in the Divi tools like the library group (E9).
|
||||
$themeBuilderVisible = static function () use (&$policy): bool {
|
||||
return $policy instanceof ExposurePolicy && $policy->groupEnabled(ThemeBuilderAccess::GROUP);
|
||||
};
|
||||
$themeBuilderWritable = static function () use (&$policy): bool {
|
||||
return $policy instanceof ExposurePolicy && $policy->groupWritable(ThemeBuilderAccess::GROUP);
|
||||
};
|
||||
$divi = new DiviIntegration(
|
||||
$schema,
|
||||
$changeLog,
|
||||
$libraryWritable,
|
||||
libraryVisible: $libraryVisible,
|
||||
diviWritable: $diviWritable,
|
||||
libraryInsertable: $libraryInsertable
|
||||
libraryInsertable: $libraryInsertable,
|
||||
themeBuilderWritable: $themeBuilderWritable,
|
||||
themeBuilderVisible: $themeBuilderVisible
|
||||
);
|
||||
$registry = new IntegrationRegistry(
|
||||
new CoreIntegration(self::pluginDir() . '/docs/guides'),
|
||||
|
||||
Reference in New Issue
Block a user