[wp-trac] [WordPress Trac] #37767: Conditionally modify $tagnames in strip_shortcodes()
WordPress Trac
noreply at wordpress.org
Mon Aug 22 15:39:16 UTC 2016
#37767: Conditionally modify $tagnames in strip_shortcodes()
-------------------------+-------------------------------------------------
Reporter: | Owner:
danielbachhuber | Status: new
Type: enhancement | Milestone: Future Release
Priority: normal | Version:
Component: Shortcodes | Keywords: needs-patch needs-unit-tests good-
Severity: normal | first-bug
Focuses: |
-------------------------+-------------------------------------------------
As a WordPress developer, I may want to use `strip_shortcodes()` in a
couple novel ways:
1. Strip all shortcodes except one or more shortcodes.
2. Strip one or more shortcodes, instead of all shortcodes.
If it was possible to conditionally modify `$tagnames`, I could use
`strip_shortcodes()` in this way without modifying the `$shortcode_tags`
global.
Two potential ways this could be implemented:
1. Include a second `$options = array()` argument, which supports
`include` or `exclude` as options.
2. Filter the `$tagnames` variable to permit conditional modification.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37767>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list