royal-mcp__wp_replace_text_in_blocks
Find and replace literal text inside the blocks of a post (all blocks, or the block at path and its inner blocks). Text is replaced in each block's markup and attributes together so blocks stay valid; the replacement goes in as text (HTML characters are encoded), and block comments are never touched; to change markup use wp_replace_block. Case-sensitive, no regex. dry_run reports matches per block without writing; expected_count aborts unless exactly that many matches exist. Checks the edit lock, refuses changes WordPress would strip for your account, saves a revision and returns an undo token. (site: demo.royalplugins.com) Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Post ID (any post type that stores block content). | |
| find | Yes | ||
| path | No | Optional: only this block and its inner blocks. | |
| dry_run | No | ||
| replace | Yes | Replacement text; empty string deletes the match. | |
| site_id | No | Site to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com) | |
| expected_count | No |