[wp-trac] [WordPress Trac] #37767: Conditionally modify $tagnames in strip_shortcodes()
WordPress Trac
noreply at wordpress.org
Thu Oct 13 22:42:55 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:
----------------------------------------------+------------------
Changes (by aaroncampbell):
* keywords: good-first-bug has-patch has-unit-tests => good-first-bug
reporter-feedback
Comment:
First of all, I do like the idea of being able to strip only certain
shortcodes. Having said that, I'm not sold on the approach here. If you're
trying to protect a certain shortcode, it might be nice to do it
everywhere. I could pretty easily imagine a plugin that has something like
a footnote shortcode and would want to be able to leave it in excerpts
(where core calls `strip_shortcodes()`).
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37767#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list