WordPress: replace exact text inside a theme option
wp_theme_option_replaceReplace exact text inside a theme option, e.g. take one offer out of the business schema in _crb_header_script without removing the whole block. Exact count (expect, default 1), and the new text can't add markup (no < or >). Previews the text around it before and after; confirm to replace. The old value is backed up and the site cache cleared. Needs Bridge 1.7.2+ and an administrator's application password.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The _crb_* option, from wp_theme_options_get or wp_snippets_get | |
| site | Yes | ||
| expect | No | How many times search appears (default 1) | |
| search | Yes | The exact text, as listed | |
| confirm | No | Leave false to preview: nothing changes and the preview shows exactly what would happen. Set true only after the user has agreed to this exact change. | |
| replace | Yes | The new text ("" removes it); no < or > |