"cafesio-theme"). * * @var string[] */ private const THEME_SLUGS = [ 'exhibz', 'digiqole', 'instive', 'bizxpo', 'cafesio', 'gloreya', 'eventplace', 'autrics', 'deliciko', 'qoxag', ]; /** * Suffix appended to a theme slug to form its vector-database key. */ private const THEME_KEY_SUFFIX = '-theme'; /** * Resolve the active Themewinter theme's vector-DB key. * * Reads the active theme (stylesheet + parent template, so child themes work) * rather than the screen ID, which cannot identify the theme in the Customizer. * * @return string Key such as "cafesio-theme", or '' if not a Themewinter theme. */ public static function get_active_theme_key(): string { foreach ( [ get_stylesheet(), get_template() ] as $slug ) { if ( in_array( $slug, self::THEME_SLUGS, true ) ) { return $slug . self::THEME_KEY_SUFFIX; } } return ''; } /** * Get the Themewinter theme folder slugs. * * @return string[] */ public static function get_theme_slugs(): array { return self::THEME_SLUGS; } /** * Get every theme vector-database key ("{slug}-theme"). * * @return string[] */ public static function get_all_theme_keys(): array { return array_map( static function ( string $slug ): string { return $slug . self::THEME_KEY_SUFFIX; }, self::THEME_SLUGS ); } }