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:
Jan-Niclas Loosen
2026-10-18 21:49:28 +02:00
co-authored by Claude Sonnet 5.5
parent abeb4b0eed
commit 06148fb8c1
33 changed files with 952 additions and 154 deletions
+10 -4
View File
@@ -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()
);
}
}