[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 15:45:06 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  |
------------------------------------+------------------

Comment (by aaroncampbell):

 Couldn't we just use a has_filter check to see if we want to add
 do_shortcode, then add it to priority 11?
 {{{
 if ( ! has_filter( 'widget_text', 'do_shortcode' ) )
         add_filter( 'widget_text', 'do_shortcode', 11 );
 }}}

 Then we're not undoing something that a plugin or theme is already doing,
 we're not running do_shortcode twice, and we're always running it after
 wpautop.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19411#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list