[wp-trac] [WordPress Trac] #10573: Pass $instance to the "widget_text" filter

WordPress Trac wp-trac at lists.automattic.com
Sun Aug 9 07:41:25 UTC 2009


#10573: Pass $instance to the "widget_text" filter
--------------------------+-------------------------------------------------
 Reporter:  Viper007Bond  |       Owner:  azaozz    
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  Widgets       |     Version:            
 Severity:  normal        |    Keywords:  has-patch 
--------------------------+-------------------------------------------------
 I'm trying to conditionally change the content of the text widget. I'm
 storing whether I need to modify the content or not in the widget's
 settings by using the `widget_update_callback` filter and adding a key to
 the array. However I cannot access the reset of the widget's settings
 (where my new key is) from within the `widget_text` filter.

 Attached patch passes `$instance` to the `widget_title` and `widget_text`
 filters for increased flexibility.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10573>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list