[wp-trac] [WordPress Trac] #33411: remove_panel('nav_menus') action generates errors

WordPress Trac noreply at wordpress.org
Mon Aug 24 19:42:03 UTC 2015


#33411: remove_panel('nav_menus') action generates errors
---------------------------------+-----------------------------------------
 Reporter:  IstanbulMMV          |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  4.3.1
Component:  Customize            |     Version:  4.3
 Severity:  normal               |  Resolution:
 Keywords:  needs-patch 2nd-     |     Focuses:  javascript, administration
  opinion                        |
---------------------------------+-----------------------------------------
Changes (by westonruter):

 * keywords:  needs-patch => needs-patch 2nd-opinion
 * focuses:  administration => javascript, administration


Comment:

 [attachment:33411.diff] adds short-circuiting to
 `wp.customize.Menus.AvailableMenuItemsPanelView.initialize()` if there is
 no `nav_menus` panel. This eliminates the JS error.

 However, I'm not entirely sure that this is the right approach. If the nav
 menus are truly eliminated from the Customizer, then the overwhelming best
 approach is to undo the actions/filters that initialize it to begin with
 (as shown above), since this also has a performance improvement.

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


More information about the wp-trac mailing list