feat: Fähigkeiten theme-option-read/-write und font-upload; ThemeOptionsAdapter und FontCatalog (Manifest, Nachbau customizer-typography, Signatur-Referenzen) und DesignRights::themeOptions()/fonts()

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Niclas Loosen
2026-10-19 17:44:57 +02:00
co-authored by Claude Sonnet 5.5
parent 8379c55c89
commit a90cd7f5bd
14 changed files with 4765 additions and 26 deletions
@@ -6,8 +6,10 @@ namespace LIT\MCP\Tests\Unit\Integrations\Divi\Release;
use LIT\MCP\Integrations\Divi\Design\DesignSystemReader;
use LIT\MCP\Integrations\Divi\Design\DesignSystemWriter;
use LIT\MCP\Integrations\Divi\Design\FontCatalog;
use LIT\MCP\Integrations\Divi\Design\GlobalColorsAdapter;
use LIT\MCP\Integrations\Divi\Design\GlobalVariablesAdapter;
use LIT\MCP\Integrations\Divi\Design\ThemeOptionsAdapter;
use LIT\MCP\Integrations\Divi\Library\DiviLibraryStore;
use LIT\MCP\Integrations\Divi\Library\DiviRoles;
use LIT\MCP\Integrations\Divi\Pages\DiviPages;
@@ -82,6 +84,26 @@ final class DiviFeatureAssignmentTest extends TestCase
'GlobalData::set_global_variables()' => ['variable-write'],
'et_pb_is_allowed()' => ['variable-write'],
],
ThemeOptionsAdapter::class => [
'et_sanitize_font_choices()' => ['theme-option-write'],
'et_sanitize_global_font_weight()' => ['theme-option-write'],
'et_sanitize_float_number()' => ['theme-option-write'],
'et_sanitize_int_number()' => ['theme-option-write'],
'et_divi_global_font_style()' => ['theme-option-write'],
'et_update_option()' => ['theme-option-write'],
'et_delete_option()' => ['theme-option-write'],
'ET_Core_PageResource::remove_static_resources()' => ['theme-option-write'],
'et_pb_force_regenerate_templates()' => ['theme-option-write'],
'et_pb_is_allowed()' => ['theme-option-write'],
'Nachbau et_divi_customizer_theme_settings()' => ['theme-option-read', 'theme-option-write'],
],
FontCatalog::class => [
'et_builder_get_fonts()' => ['font-upload', 'theme-option-write', 'variable-write'],
'et_builder_get_custom_fonts()' => ['font-upload', 'theme-option-write', 'variable-write'],
'et_builder_get_google_fonts()' => ['font-upload', 'theme-option-write', 'variable-write'],
'et_builder_get_websafe_fonts()' => ['font-upload', 'theme-option-write', 'variable-write'],
'et_pb_is_allowed()' => ['font-upload'],
],
DiviModules::class => [
'ModuleRegistration::get_all_core_modules_metadata()' => ['catalog'],
'ModuleRegistration::get_default_attrs()' => ['catalog'],
@@ -143,7 +165,7 @@ final class DiviFeatureAssignmentTest extends TestCase
}
self::assertSame(self::EXPECTED, $actual);
self::assertSame(array_keys(self::EXPECTED), DiviAdapters::CLASSES, 'all ten adapters, in report order');
self::assertSame(array_keys(self::EXPECTED), DiviAdapters::CLASSES, 'all twelve adapters, in report order');
}
public function testReadingAdaptersCarryNoWriteFeature(): void