[wp-trac] [WordPress Trac] #37767: Conditionally modify $tagnames in strip_shortcodes()
WordPress Trac
noreply at wordpress.org
Thu Oct 13 23:06:43 UTC 2016
#37767: Conditionally modify $tagnames in strip_shortcodes()
----------------------------------------------+------------------
Reporter: danielbachhuber | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.7
Component: Shortcodes | Version:
Severity: normal | Resolution:
Keywords: good-first-bug reporter-feedback | Focuses:
----------------------------------------------+------------------
Comment (by danielbachhuber):
Replying to [comment:7 aaroncampbell]:
> What are the downsides of just making the `$tagnames` array filterable
(before it's intersected with the matches). A filter name like
`strip_shortcode_tagnames` seems reasonable.
I'd be amenable to taking the filter approach instead of introducing
another supplied argument.
I think the downside to the filter approach is that you'd need to create
the filter before using `strip_shortcodes()`, and then remove it
afterwords. Filter definition is easy enough with closures though, and
does grant more flexibility.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37767#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list