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

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 17 01:01:02 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  |
-------------------------------------------------+------------------
Changes (by aaroncampbell):

 * keywords:  ux-feedback => ux-feedback has-patch needs-testing


Comment:

 The new patch sets an option called "theme_switched" in `switch_theme()`
 and then checks for it on init and fixes the widgets.  It also maps
 leftovers to sidebar 1 instead of init, so if the old theme had 4 sidebars
 and the new has 3 it will do this:

 * Old A -> New 1
 * Old B -> New 2
 * Old C -> New 3
 * Old D -> New 1

 Westi: It still doesn't handle preview, but but it handles the actual
 switch pretty nicely.

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


More information about the wp-trac mailing list