[wp-trac] [WordPress Trac] #19411: do_shortcode() runs before wpautop() in the text widget
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 2 00:21:21 UTC 2011
#19411: do_shortcode() runs before wpautop() in the text widget
------------------------------------+------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.3
Component: General | Version: 3.3
Severity: major | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------
Changes (by nacin):
* keywords: => has-patch dev-feedback
Comment:
[attachment:19411.diff] is based on two things I noticed while creating
this patch:
* Anyone currently adding do_shortcode to widget_text is doing it on
priority 10. That means moving it to priority 11 might mean do_shortcode()
gets called twice.
* It is easier to conditionally remove wpautop() than to add it. That is
because we need all of them to be on priority 10, but wpautop() added
first. Conditionally adding it means removing all three, then
conditionally adding them back (perhaps even a has_filter() beforehand, in
case a plugin has altered which are added).
In light of that, it seems like the best approach.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19411#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list