[wp-trac] Re: [WordPress Trac] #9651: New Widget API - breaks plugins - widget options

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 27 04:19:58 GMT 2009


#9651: New Widget API - breaks plugins - widget options
--------------------------+-------------------------------------------------
 Reporter:  ceenz         |       Owner:                                                                            
     Type:  defect (bug)  |      Status:  new                                                                       
 Priority:  normal        |   Milestone:  2.8                                                                       
Component:  Widgets       |     Version:  2.8                                                                       
 Severity:  normal        |    Keywords:  widget, plugin, multi-widget, widget options, widget context, widget logic
--------------------------+-------------------------------------------------

Comment(by ryan):

 This:

 {{{
 if ( false !== $instance ) {
     $widget_options_compare = array($new_instance,$instance);
     $instance =
 apply_filters('default_widget_options_update',$widget_options_compare,
 $this);
 }
 }}}

 Seems like it should be:

 {{{
 if ( false !== $instance ) {
     $instance = apply_filters('default_widget_options_update', $instance,
 $new_instance, $this);
 }
 }}}

 Otherwise, all widgets will break because $instance is being set to a
 multi-dimensional array containing both $new_instance and $instance, which
 is unexpected.  With your plugin installed, the problem is obscured.

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


More information about the wp-trac mailing list