fix: Divi-Reiter ohne Divi, Zustandstexte, Schreibsperren und Aufräum-Filter aus der Abschlussprüfung
Behebt die fünf Befunde der Abschlussprüfung von divi-absicherung: Divi-Reiter ohne aktives Divi zeigt nur noch einen Hinweis (kein Status, keine Prüfung, kein Aufräumen), Zustandstexte werden erst beim Rendern übersetzt, DiviPages::setFlags() und DiviThemeBuilder::liveId(true) prüfen jetzt selbst die Freigabesperre, WriteProbe::removeOrphans() löscht nur noch Entwürfe mit passendem Titel, und wp lit-mcp divi-check --update-reference verweigert sich ohne Entwicklungskopie, bevor irgendetwas geschrieben wird. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,8 +6,10 @@ namespace LIT\MCP\Integrations\Divi\Pages;
|
||||
|
||||
use LIT\MCP\Integrations\Divi\Release\Call;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviAdapter;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviLocked;
|
||||
use LIT\MCP\Integrations\Divi\Release\Manifest;
|
||||
use LIT\MCP\Integrations\Divi\Release\Mirror;
|
||||
use LIT\MCP\Integrations\Divi\Release\ReleaseGate;
|
||||
use RuntimeException;
|
||||
use WP_Post;
|
||||
|
||||
@@ -50,9 +52,13 @@ final class DiviPages implements DiviAdapter
|
||||
);
|
||||
}
|
||||
|
||||
/** @throws RuntimeException When a flag does not read back as set. */
|
||||
/**
|
||||
* @throws RuntimeException When a flag does not read back as set.
|
||||
* @throws DiviLocked When Divi is not released (spec §5.5) – before anything is written.
|
||||
*/
|
||||
public static function setFlags(int $postId): void
|
||||
{
|
||||
ReleaseGate::assertWritable($postId);
|
||||
foreach (self::FLAGS as $key => $value) {
|
||||
update_post_meta($postId, $key, $value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user