[wp-trac] [WordPress Trac] #39693: Fix missing assignment of widgets on theme switch

WordPress Trac noreply at wordpress.org
Wed Mar 1 20:17:31 UTC 2017


#39693: Fix missing assignment of widgets on theme switch
-------------------------+-----------------------
 Reporter:  melchoyce    |       Owner:
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  4.8
Component:  Widgets      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+-----------------------

Comment (by melchoyce):

 > If your old theme and new theme share a similar IDs or names, map them
 automatically

 @ipstenu grabbed some data for us from the theme directory.
 [https://wordpress.slack.com/archives/meta/p1488318470703436 Logs here].

 Most common widget area names seem to be:

 1. Sidebar (with Sidebar1, Sidebar2, etc being right down the line)
 2. Main (with a Main Sidebar being a very popular second)
 3. [Left|Right] Sidebar

 Bottom, footer, header, and custom were clustered together in the list of
 widget areas. Many more are "Footer [something]."

 Surprisingly, the data seemed to indicate that Left Sidebar was more
 common than Right Sidebar. I don't know if we should map Left to Sidebar,
 etc., and Right with Sidebar2, based on that, or go with my gut and do
 Sidebar --> Right, Sidebar 2 --> Left. Let's ''try'' the latter option and
 then test a bunch of themes.

 I think, using this info and some research of my own, we could assume:

 - Sidebar, Sidebar 1, Main, Main Sidebar, Primary, Primary Sidebar, Right
 Sidebar, and First can all be mapped to each other
 - Sidebar 2, Left Sidebar, and Second can be mapped to each other
 - Footer and Bottom can be mapped to each other
 - Header and Top can be mapped to each other

 And if always, if there's an exact match, it should map to that widget
 area. Or, if your old theme only has one widget area and your new theme
 only has one widget area, just map them automatically.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39693#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list