wp_blocks_replace
Replace a Gutenberg block with zero or more blocks in WordPress, using hash references to avoid overwriting stale content and supporting dry-run preview.
Instructions
Replace one Gutenberg block with zero or more blocks. Hash references prevent overwriting a block changed since it was read. Supports dry-run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | Yes | ||
| ref | Yes | Post or page ID/slug | |
| blocks | Yes | ||
| dry_run | No | Preview changes without writing | |
| post_type | No | page | |
| allow_normalization | No | Allow saving when parse/serialize normalizes the original content | |
| if_unmodified_since | No | Fail if modified_gmt changed since this timestamp |