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

WordPress Trac noreply at wordpress.org
Mon Apr 3 22:58:08 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:  has-patch needs-testing  |     Focuses:
-------------------------------------+-----------------------

Comment (by westonruter):

 As with #39693, I've forked the slurper and have written a parser for
 obtaining the sidebar args for the themes: https://github.com/xwp
 /WordPress-Theme-Directory-Slurper/tree/master/feature-stats/registered-
 nav-menu-locations

 Here are stats from the parsing:
 https://docs.google.com/spreadsheets/d/1QCormQoVGlI8rKxgn0ylxEw4JAa71372wdoJwgLvENs/edit#gid=0

 The most common number of nav menu locations is 1, followed by 0 and then
 2. The max a theme has is 9. Here are the stats:

 ||= '''Location Count''' =||= '''Theme Quantity''' =||
 || 0 || 1312
 || 1 || 1921
 || 2 || 878
 || 3 || 291
 || 4 || 79
 || 5 || 10
 || 6 || 2
 || 7 || 2
 || 9 || 1

 Plotted:

 [[Image(quantity-of-themes-having-nav-menu-location-counts.png,
 width=400)]]

 As for the most popular sidebar IDs used, here are the top 30:

 ||= '''Sidebar ID''' =||= '''Count''' =||
 || primary ||   2141
 || footer ||    302
 || social ||    295
 || secondary || 249
 || main-menu || 132
 || header-menu ||       109
 || footer-menu ||       94
 || top-menu ||  80
 || top ||       76
 || primary-menu ||      73
 || main ||      65
 || header ||    49
 || main-nav ||  45
 || main_menu || 37
 || subsidiary ||        36
 || custom_menu ||       33
 || footer_menu ||       31
 || header_menu ||       30
 || Header ||    24
 || menu-1 ||    24
 || main-navigation ||   23
 || footer-nav ||        23
 || mobile ||    23
 || top_menu ||  21
 || menu ||      18
 || main_nav ||  18
 || mainmenu ||  18
 || primary_nav ||       17
 || notfound ||  16
 || top-nav ||   15

 There is a degree of normalization that can be done for these, such as
 replacing “main” with “primary”, removing hyphens, removing “navigation”
 and “menu” and so on.

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


More information about the wp-trac mailing list