[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
Fri May 1 23:45:13 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 azaozz):

 Replying to [comment:8 Denis-de-Bernardy]:
 >  - During the conversion, I'd ensure that sidebars with similar names
 are left unchanged.

 There's actually a loop that checks for identical names, perhaps see why
 it doesn't pick your old "sidebar-1" from above.

 >  - Until the widgets page is loaded and a widget is moved, the actual
 option would get converted by a filter on all page loads, but not saved.
 That way, theme preview works too. And you can activate a theme and look
 at its options screen before things become permanent.

 Yes, moving a widget will overwrite `$sidebars_widgets` with the new data.
 The problem is with the front-end. Can keep converting it only in memory
 on each page load but that will have to happen for the front-end too so
 widgets are displayed. It's not a lot of code but wanted to avoid adding
 more runtime functions (also the part where it looks for lost multi-
 widgets settings will have to look only in the options cache to avoid more
 db queries).

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


More information about the wp-trac mailing list