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

WordPress Trac noreply at wordpress.org
Wed Mar 1 21:26:11 UTC 2017


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

Comment (by melchoyce):

 Following up on this ticket after posting [ticket:39693#comment:20].

 > If your old theme and new theme share a similar (not the same) IDs or
 name, map them automatically (so, primary, main, menu 1, etc. are all
 similar in concept)

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

 Most common menu area names seem to be:

 1. Main
 2. Primary
 3. Secondary
 4. Footer
 5. Navigation
 6. Subsidiary

 Using that info & some more research, I think we can do this:

 - Main, Primary, and Navigation (along with any combination of these, like
 Main Navigation) can all be mapped to each other
 - Secondary and Subsidiary can be mapped to each other
 - Anything with "Footer" or "Bottom" in it can be mapped, if they don't
 match
 - Anything with "Social" in it can be mapped, if they don't match
 - Anything with "Top" in it can be mapped, if they don't match

 This is in addition to:

 1. If your old theme only has one menu and your new theme only has one
 menu, just map them automatically.
 2. If your old theme has more than one menu, or your new theme has more
 than one menu, map the menu in the first menu location in your old theme
 to the first menu location in the new theme.

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


More information about the wp-trac mailing list