wp_nav_menu_setup

Register nav menu meta boxes and advanced menu items.

Description

wp_nav_menu_setup(); 

Usage

  1. if ( !function_exists( 'wp_nav_menu_setup' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/nav-menu.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_nav_menu_setup(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/nav-menu.php  
  1. function wp_nav_menu_setup() { 
  2. // Register meta boxes 
  3. add_meta_box( 'add-custom-links', __( 'Custom Links' ), 'wp_nav_menu_item_link_meta_box', 'nav-menus', 'side', 'default' ); 
  4.  
  5. // Register advanced menu items (columns) 
  6.  
  7. // If first time editing, disable advanced items by default. 
  8. if ( false === get_user_option( 'managenav-menuscolumnshidden' ) ) { 
  9. $user = wp_get_current_user(); 
  10. update_user_option($user->ID, 'managenav-menuscolumnshidden',  
  11. array( 0 => 'link-target', 1 => 'css-classes', 2 => 'xfn', 3 => 'description', 4 => 'title-attribute', ),  
  12. true);