[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 09:30:19 UTC 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):

 right. but then you go:


 {{{
 $GLOBALS['_wp_sidebars_widgets'] = wp_get_sidebars_widgets(false); //
 without array version, and with filters applied

 ...

 $sidebars_widgets = &$GLOBALS['_wp_sidebars_widgets'];

 ...

 update_option('sidebars_widgets', $sidebars_widgets); // should be
 wp_set_sidebars_widgets($sidebars_widgets);, and $sidebars_widgets has
 filters applied
 }}}

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


More information about the wp-trac mailing list