WordPress: remove a header or footer snippet
wp_snippet_removeRemove one existing snippet (e.g. an old promo-bar script) from a header/footer plugin or the theme's own script box: pass one block exactly as wp_snippets_get lists it (it must appear exactly once), or, for a block mixed in with others, starts_with and ends_with (everything from the one starts_with through the first ends_with after it; Bridge 1.7.1+). Adding snippets is never possible. The preview shows exactly what would be removed; confirm to remove. The whole old value is backed up and the site cache cleared. Needs Bridge 1.7.0+ and an administrator's application password.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | ||
| exact | No | One block exactly as listed | |
| option | Yes | From wp_snippets_get, e.g. shfs_insert_footer or _crb_footer_script | |
| 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. | |
| ends_with | No | With starts_with: the text the span ends with, e.g. </script> | |
| starts_with | No | Instead of exact: the text the span starts with (appearing once), e.g. the comment naming it |