[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 15:26:53 UTC 2017
    
    
  
#40189: '.metabox-prefs:first' is not a reliable selector for meta boxes in nav
menus
-------------------------------+------------------------------
 Reporter:  goth69             |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Customize          |     Version:  4.7
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  javascript
-------------------------------+------------------------------
Comment (by goth69):
 Hi there,
 i have got a simple example according to the WooCommerce Endpoints meta
 box.
 {{{#!php
 function add_nav_menu_meta_boxes() {
         add_meta_box( 'test-metabox', 'Test MetaBox Title',
 'test_metabox_callback', 'nav-menus', 'side', 'low' );
 }
 add_action( 'admin_init', 'add_nav_menu_meta_boxes' );
 function test_metabox_callback() {
         echo '<div>Test Content</div>';
 }
 }}}
 //I think the behavior of the sample meta box is not the appropriate
 behavior, because the meta box does not appear in Customizer, only the
 meta box toggle. I will add some screenshots, too.
 // My workaround for the problem is using a '.metabox-prefs' selector
 instead of '.metabox-prefs:first' selector.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40189#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list