[wp-trac] Re: [WordPress Trac] #9695: New widget interface moves
the wrong inaccessible widgets when switching themes
WordPress Trac
wp-trac at lists.automattic.com
Sat May 2 10:10:21 GMT 2009
#9695: New widget interface moves the wrong inaccessible widgets when switching
themes
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: Denis-de-Bernardy
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 2.8
Component: Widgets | Version: 2.8
Severity: major | Keywords: needs-patch
-------------------------------+--------------------------------------------
Comment(by Denis-de-Bernardy):
I'm currently nailing it down to this:
{{{
// Assign to each unmatched registered sidebar the first available
orphan
while ( ( $sidebar = array_shift( $sidebars ) ) && $widgets =
array_shift( $sidebars_widgets ) )
$_sidebars_widgets[ $sidebar ] = $widgets;
}}}
Apart from the fact that it does not work as the comment suggests it
shows, it is invalid to do so. I've a plugin called Feed Widgets, for
instance, which allows to put widgets after each post in a feed. If left
empty, and were the above code work, it may end up tossing widgets into
there, without the user being aware of it.
I take it that it's there to make the likes of converting from sidebar-1,
sidebar-2 to left-sidebar, right-sidebar automatic. But this can be so
potentially bug prone that I believe we're better off not trying to do so
at all, and letting the user configure his widgets as needed upon changing
themes.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9695#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list