WordPress: Replace in post
wp_replace_in_postReplace an exact string inside one post's content. Prefer this over rewriting a whole page — it changes only what you name. The call is REFUSED if the number of matches is not what you expected, so pass expect honestly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | ||
| expect | No | How many matches you expect | |
| search | Yes | ||
| confirm | No | Leave unset to preview the matches. Set true only after the user has agreed to the exact replacement. | |
| post_id | Yes | ||
| replace | Yes |