[wp-trac] Re: [WordPress Trac] #10300: Optimization in wp_get_sidebars_widgets() corrupts the widgets

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 1 01:08:22 GMT 2009


#10300: Optimization in wp_get_sidebars_widgets() corrupts the widgets
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  azaozz
     Type:  defect (bug)       |      Status:  new   
 Priority:  normal             |   Milestone:  2.8.1 
Component:  Widgets            |     Version:  2.8   
 Severity:  normal             |    Keywords:        
-------------------------------+--------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:6 azaozz]:
 > Replying to [comment:4 Denis-de-Bernardy]:
 > > 10300.2.patch prevents the sidebars_widgets filter from getting
 applied differently from a call to the next.
 >
 > The `return $_wp_sidebars_widgets;` in wp_get_sidebars_widgets() can be
 replaced with (...)

 but then whichever first filter is applied (if any) becomes "sticky" (and
 potentially tossed into the the db).

 then again, we already have that problem anyway, so +1 to the approach.


 > > could we, instead of assigning non-existing sidebars to new ones,
 assign unused widgets over into the inactive
 >
 > This is done in wp-admin/widgets.php as it applies to changing themes
 too. Could perhaps add it here as well. Nevertheless when upgrading from
 very old version of WordPress the user would need to visit the Widgets
 screen to properly reset any previously used widgets.

 this would be desirable imo.

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


More information about the wp-trac mailing list