__('LIT MCP Endpunkt', 'wp-lit-mcp'), 'test' => [$this, 'run'], ]; return $tests; } /** @return array */ public function run(): array { $oauth = $this->status->oauthEnabled(); $endpoint = $oauth ? $this->status->endpoint(true) : null; $good = $oauth && ($endpoint['ok'] ?? false) === true; $detail = $oauth ? (string) ($endpoint['message'] ?? '') : __('Der OAuth-Server ist deaktiviert (Filter wpmedia_mcp_oauth_server_enabled).', 'wp-lit-mcp'); return [ 'label' => $good ? __('Der LIT-MCP-Endpunkt ist erreichbar und verlangt OAuth', 'wp-lit-mcp') : __('Der LIT-MCP-Endpunkt ist nicht nutzbar', 'wp-lit-mcp'), 'status' => $good ? 'good' : 'critical', 'badge' => ['label' => 'LIT MCP', 'color' => $good ? 'blue' : 'red'], 'description' => '

' . esc_html($detail) . '

', 'actions' => sprintf( '%s', esc_url(SettingsPage::url('verbindung')), esc_html__('Einstellungen → LIT MCP', 'wp-lit-mcp') ), 'test' => self::TEST, ]; } }