[ 'edition' => [ 'id' => 'wordpress-lite', 'channel' => 'wordpress', 'tier' => 'lite', ], 'features' => [ 'profiles' => false, 'whiteLabel' => false, 'customBranding' => false, 'launcherSize' => false, 'remoteConfig' => false, 'analytics' => false, 'readAloud' => false, 'lineHeight' => false, 'textSpacing' => false, 'pageStructure' => false, 'displayRules' => false, ], ], 'wordpress-pro' => [ 'edition' => [ 'id' => 'wordpress-pro', 'channel' => 'wordpress', 'tier' => 'pro', ], 'features' => [ 'profiles' => true, 'whiteLabel' => true, 'customBranding' => true, 'launcherSize' => true, 'remoteConfig' => false, 'analytics' => false, 'readAloud' => true, 'lineHeight' => true, 'textSpacing' => true, 'pageStructure' => true, 'displayRules' => true, ], ], 'widget-lite' => [ 'edition' => [ 'id' => 'widget-lite', 'channel' => 'widget', 'tier' => 'lite', ], 'features' => [ 'profiles' => false, 'whiteLabel' => false, 'customBranding' => false, 'launcherSize' => false, 'remoteConfig' => false, 'analytics' => false, 'readAloud' => false, 'lineHeight' => false, 'textSpacing' => false, 'pageStructure' => false, 'displayRules' => false, ], ], 'widget-pro' => [ 'edition' => [ 'id' => 'widget-pro', 'channel' => 'widget', 'tier' => 'pro', ], 'features' => [ 'profiles' => true, 'whiteLabel' => true, 'customBranding' => true, 'launcherSize' => false, 'remoteConfig' => false, 'analytics' => false, 'readAloud' => true, 'lineHeight' => true, 'textSpacing' => true, 'pageStructure' => true, 'displayRules' => false, ], ], ]; } public static function get_fallback() { return [ 'edition' => [ 'id' => 'generic', 'channel' => 'generic', 'tier' => 'custom', ], 'features' => [ 'profiles' => true, 'whiteLabel' => true, 'customBranding' => true, 'launcherSize' => true, 'remoteConfig' => false, 'analytics' => false, 'readAloud' => true, 'lineHeight' => true, 'textSpacing' => true, 'pageStructure' => false, 'displayRules' => false, ], ]; } public static function build( $edition_id = 'generic', $overrides = [] ) { $presets = self::get_presets(); $base = isset( $presets[ $edition_id ] ) ? $presets[ $edition_id ] : self::get_fallback(); return array_replace_recursive( $base, is_array( $overrides ) ? $overrides : [] ); } }