Make WordPress Core

Ticket #24256: nav-menu.diff

File nav-menu.diff, 735 bytes (added by louisremi, 12 years ago)

Add a 'initial_nav_menu_meta_boxes' filter

  • trunk/wp-admin/includes/nav-menu.php

     
    424424        if ( get_user_option( 'metaboxhidden_nav-menus' ) !== false || ! is_array($wp_meta_boxes) )
    425425                return;
    426426
    427         $initial_meta_boxes = array( 'nav-menu-theme-locations', 'add-page', 'add-custom-links', 'add-category' );
     427        $initial_meta_boxes = apply_filters( 'initial_nav_menu_meta_boxes', array(
     428                'nav-menu-theme-locations',
     429                'add-page',
     430                'add-custom-links',
     431                'add-category'
     432        ));
    428433        $hidden_meta_boxes = array();
    429434
    430435        foreach ( array_keys($wp_meta_boxes['nav-menus']) as $context ) {