[wp-trac] [WordPress Trac] #25644: strip_shortcodes always removes text between shortcode tags, should be optional
WordPress Trac
noreply at wordpress.org
Sun Oct 20 22:58:56 UTC 2013
#25644: strip_shortcodes always removes text between shortcode tags, should be
optional
-------------------------+------------------------------
Reporter: jonscaife | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 3.6.1
Severity: trivial | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by gMagicScott):
I agree that there are many shortcodes that leave content distorted when
totally removed, but I think the interest in modifying how shortcodes are
removed is more an interest of the plugin/theme that ''provides'' the
shortcode, than whoever calls `strip_shortcodes()`
A better solution may be to add a filter to the return value of
`strip_shortcode_tag()`. Individual plugins and themes can then manage the
output, knowing the desired result is to remove it.
Patch attached (strip_shortcodes.1.diff), or on
[https://github.com/gMagicScott/WordPress/commit/0d14c9a5212d53a374c8ef40b8bd33db7c5cf5ae
GitHub]
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25644#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list