refactor: Kern ohne Divi – Ports BuilderDetector, MediaUsageSource, EnvironmentComponent und ausgeschlossene Post-Typen im ContentSchema; Divi-Implementierungen und Verdrahtung über DiviIntegration/Plugin; CoreIndependenceTest
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
abeb4b0eed
commit
06148fb8c1
+10
-4
@@ -125,14 +125,15 @@ final class Plugin
|
||||
themeBuilderVisible: $themeBuilderVisible
|
||||
);
|
||||
$registry = new IntegrationRegistry(
|
||||
new CoreIntegration(self::pluginDir() . '/docs/guides'),
|
||||
new CoreIntegration(self::pluginDir() . '/docs/guides', [$divi->environmentComponent()]),
|
||||
new WordPressIntegration(
|
||||
$schema,
|
||||
$changeLog,
|
||||
$divi->contentComposer($diviWritable),
|
||||
$divi->libraryIdsVisible(...)
|
||||
$divi->libraryIdsVisible(...),
|
||||
$divi->builderDetector()
|
||||
),
|
||||
new MediaIntegration($schema, $changeLog, $limits),
|
||||
new MediaIntegration($schema, $changeLog, $limits, $divi->mediaUsageSources()),
|
||||
$divi,
|
||||
$divi->library(),
|
||||
$divi->themeBuilder()
|
||||
@@ -217,6 +218,11 @@ final class Plugin
|
||||
array_unshift($sources, new PodsFieldSource());
|
||||
}
|
||||
|
||||
return new ContentSchema($sources);
|
||||
// Divi's post types and builder check come in statically: the schema exists before the Divi integration.
|
||||
return new ContentSchema(
|
||||
$sources,
|
||||
DiviIntegration::builderEnabledFor(...),
|
||||
DiviIntegration::internalPostTypes()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user