feat: Divi read tools accept library entries (library access, E1/E3)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,7 @@ final class PostGuard
|
||||
|
||||
$post = get_post($id);
|
||||
if (! $post instanceof WP_Post || ! $schema->isManaged((string) $post->post_type)) {
|
||||
return Errors::notFound(sprintf('Eintrag %d nicht gefunden (oder kein unterstützter Inhaltstyp).', $id));
|
||||
return self::notFound($id);
|
||||
}
|
||||
|
||||
if (! current_user_can('edit_post', $id)) {
|
||||
@@ -63,6 +63,12 @@ final class PostGuard
|
||||
return $post;
|
||||
}
|
||||
|
||||
/** The refusal for an ID that names no entry the tools manage – the same for every such ID. */
|
||||
public static function notFound(int $id): WP_Error
|
||||
{
|
||||
return Errors::notFound(sprintf('Eintrag %d nicht gefunden (oder kein unterstützter Inhaltstyp).', $id));
|
||||
}
|
||||
|
||||
/**
|
||||
* A scheduled entry whose publication time has passed (WordPress' cron missed it) or is
|
||||
* less than a minute away: wp_insert_post() turns "future" into "publish" on any save when
|
||||
|
||||
Reference in New Issue
Block a user