feat: content-create and content-update with schema validation
All-or-nothing writes: validation (fields, terms, featured image, parent, template) before any write; failed extras delete the new draft (create) or restore revision, old columns, fields, terms and featured image (update). content-update requires rev; Rev::ofPost covers content, title, excerpt, status and post_modified_gmt. MetaFieldSource::write() now throws on failure. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -61,7 +61,7 @@ class PostPresenter
|
||||
'terms' => JsonMap::of($this->terms($post)),
|
||||
'fields' => JsonMap::of($this->fields($post)),
|
||||
'featured_image' => $this->featuredImage($post),
|
||||
'rev' => Rev::of((string) $post->post_content),
|
||||
'rev' => Rev::ofPost($post),
|
||||
'hints' => $divi ? [self::DIVI_HINT] : [],
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user