get_profile( $slug ); if ( null !== $profile ) { return $profile->get_name(); } return __( 'Other (OAuth)', 'acrossai-mcp-manager' ); } /** * Normalize a slug into the bucket used by the server-wide settings gate. * * An empty slug ('' — DCR client with no matching profile) collapses to * OTHER_SLUG so `is_slug_enabled_on_server()` can enforce a single * `allow_other` toggle instead of a special-case branch at every call site. * * @param string $slug Raw slug from a client row. * @return string OTHER_SLUG for empty input, otherwise the input unchanged. */ public static function bucket( string $slug ): string { return '' === $slug ? self::OTHER_SLUG : $slug; } }