[wp-trac] [WordPress Trac] #17979: Avoid losing widgets when switching themes

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 5 02:31:47 UTC 2011


#17979: Avoid losing widgets when switching themes
-------------------------------------------------+------------------
 Reporter:  lancewillett                         |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  high                                 |   Milestone:  3.3
Component:  Widgets                              |     Version:  2.9
 Severity:  normal                               |  Resolution:
 Keywords:  ux-feedback has-patch needs-testing  |
-------------------------------------------------+------------------

Comment (by azaozz):

 Replying to [comment:67 SergeyBiryukov]:

 I think this is happening because `retrieve_widgets()` is not run on the
 first login after new install. The fix for `wp_get_widget_defaults()` will
 work but only for twentyeleven. If the first sidebar id is changed in
 twentytwelve, that will stop working again.

 Perhaps better would be to run retrieve_widgets() on the first login after
 install (i.e. set the option 'theme_switched' to true).

 Replying to [comment:65 trevogre]:
 > I didn't check the code, but there seems to be a focus on mapping
 sidebars when the names are different, based upon the number of sidebars.
 >
 > I think that is a mistake...
 > I would rather end up with nothing in that space than the wrong thing.

 This was the workflow / assumptions of the previous widgets admin page.

 > This is a major issue with the existance of widgets at all...
 > ...
 > What is the workflow that incorporates the use of widgets that is not
 considered the data version of cowboy coding...

 Widgets are user controllable and optional. If designers / theme authors
 decide not to allow the users to intervene, they can hard-code the
 sidebars easily.

 Replying to [comment:66 jb510]:
 > I was expecting something like this mockup...

 This is very similar to the current trunk except there's no yet another
 box around the orphan sidebars.

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


More information about the wp-trac mailing list