[wp-trac] [WordPress Trac] #40189: '.metabox-prefs:first' is not a reliable selector for meta boxes in nav menus

WordPress Trac noreply at wordpress.org
Mon Mar 20 18:44:52 UTC 2017


#40189: '.metabox-prefs:first' is not a reliable selector for meta boxes in nav
menus
--------------------------+-------------------------
 Reporter:  goth69        |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Customize     |     Version:  4.7
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:  javascript
--------------------------+-------------------------
Changes (by westonruter):

 * keywords:  reporter-feedback =>
 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Comment:

 @goth69 Thanks for the screenshots.

 Ok, the fundamental issue here is that metaboxes do not work in the
 customizer at all. Metaboxes are a PHP-centric approach to adding custom
 fields to screens in the admin. The customizer, on the other hand, is a
 single page application that requires a JavaScript-centric approach for
 extending nav menu items with custom fields. See #18584. This has to be
 addressed before looking at adding support for toggling which nav menu
 item custom fields are displayed.

 To add new checkboxes here it will really require much more than adding
 another selector on the line indicated. It will also require a change in
 selectors in `wp.customize.Menus.MenusPanel.ready`, but even more so it
 will creating a function like
 `wp.customize.Menus.MenusPanel.saveManageColumnsState` which specifically
 is responsible for making the `closed-postboxes`  admin-ajax requests,
 where the former only does `hidden-columns` admin ajax requests for the
 nav menus screen.

 In any case, this is really a duplicate of #18584.

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


More information about the wp-trac mailing list