feat: adapter-level Divi release lock, content-create and site status
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,12 @@ interface ContentComposer
|
||||
*/
|
||||
public function writable(): bool;
|
||||
|
||||
/**
|
||||
* Why writing such content is refused right now although it is enabled (e.g. the installed Divi version is not
|
||||
* released for LIT MCP, spec §5.5); null = allowed.
|
||||
*/
|
||||
public function refusal(): ?WP_Error;
|
||||
|
||||
/**
|
||||
* Validates the description for a new entry of $postType. Nothing is written.
|
||||
*
|
||||
|
||||
@@ -133,6 +133,11 @@ final class ContentCreateAbility implements Ability
|
||||
);
|
||||
}
|
||||
|
||||
$locked = $withDivi ? $this->divi->refusal() : null;
|
||||
if ($locked !== null) {
|
||||
return $locked;
|
||||
}
|
||||
|
||||
$prepared = $this->writer->prepare($postType, $input, true);
|
||||
$problem = self::combined($prepared, $withDivi ? $this->checkDivi($postType, $input) : null);
|
||||
if ($problem !== null) {
|
||||
|
||||
Reference in New Issue
Block a user