[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 00:52:45 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 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
{{{
return apply_filters('sidebars_widgets', $_wp_sidebars_widgets);
}}}
to fix that. The patch makes sure the conversion there is run only once
and adds and removes array_version properly.
> 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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10300#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list