feat(admin): Prüfroute je Profil und Reiter „Compatibility“
Die generische CheckRoute (POST lit-mcp/v1/<id>-check, für Divi weiter /divi-check) ersetzt DiviCheckRoute: Lock je Profil mit Besitzer-Token, Bericht je Profil, Rücksprung auf den neuen Reiter und Hook lit_mcp_compat_changed (Divi lädt darauf seinen Freigabe-Status neu). Der Reiter „Compatibility“ zeigt je Plugin Zustand (Wort und Icon), Hinweis zur Stufe, Fähigkeiten, getestete und freigegebene Versionen und den letzten Bericht, mit Prüfen, Freigeben und Zurückziehen (Recht manage_options, Allowlist der Profil-ID, Nonce je Profil). Freigeben serverseitig nur mit frischem grünem Bericht. Der Load-Hook lit_mcp_compat_profile_load bereitet den Abbau des DiviTab vor, der bis dahin parallel läuft. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7d6a97a54e
commit
85f4138b36
@@ -7,12 +7,12 @@ namespace LIT\MCP\Integrations\Divi\Admin;
|
||||
use Closure;
|
||||
use LIT\MCP\Admin\AdminPostAction;
|
||||
use LIT\MCP\Admin\AdminTab;
|
||||
use LIT\MCP\Admin\CheckRoute;
|
||||
use LIT\MCP\Admin\SettingsPage;
|
||||
use LIT\MCP\ChangeLog\ChangeLog;
|
||||
use LIT\MCP\Compatibility\ReleaseState;
|
||||
use LIT\MCP\Compatibility\CheckReport;
|
||||
use LIT\MCP\Compatibility\CheckReportStore;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviCheckRoute;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviCheckSteps;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviProfile;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviEnvironment;
|
||||
@@ -29,7 +29,7 @@ defined('ABSPATH') || exit;
|
||||
|
||||
/**
|
||||
* Tab "Divi" (spec §6): release status of the installed Divi, the table of its features (state, source, problems,
|
||||
* affected tools – E3), the latest check report, "Prüfung starten" (REST, DiviCheckRoute), "Divi <Version>
|
||||
* affected tools – E3), the latest check report, "Prüfung starten" (REST, Admin\CheckRoute), "Divi <Version>
|
||||
* freigeben" (only after a fresh green report) and "Freigabe zurückziehen" (whenever a database release applies,
|
||||
* whatever the overall state). Loading the tab removes check pages a dead check left behind – in the page's load
|
||||
* hook (removeOrphans()), not while rendering. renderNotice() is the admin notice on every admin page while a
|
||||
@@ -460,7 +460,7 @@ final class DiviTab implements AdminTab
|
||||
&& $report->freshFor($status->version, Plugin::VERSION, $this->stateKey($status->version));
|
||||
$untested = $status->state === ReleaseState::Untested && $status->version !== '';
|
||||
|
||||
printf('<form method="post" action="%s">', esc_url(DiviCheckRoute::url()));
|
||||
printf('<form method="post" action="%s">', esc_url(CheckRoute::url(DiviProfile::ID)));
|
||||
printf('<input type="hidden" name="_wpnonce" value="%s">', esc_attr(wp_create_nonce('wp_rest')));
|
||||
// The check is the one thing to do while untested without a usable report; otherwise the release leads.
|
||||
submit_button(
|
||||
|
||||
Reference in New Issue
Block a user