wp_nav_menu_item_link_meta_box

Displays a meta box for the custom links menu item.

Description

wp_nav_menu_item_link_meta_box(); 

Usage

  1. if ( !function_exists( 'wp_nav_menu_item_link_meta_box' ) ) { 
  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_item_link_meta_box(); 
  7.  

Defined (1)

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

/wp-admin/includes/nav-menu.php  
  1. function wp_nav_menu_item_link_meta_box() { 
  2. global $_nav_menu_placeholder, $nav_menu_selected_id; 
  3.  
  4. $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; 
  5.  
  6. ?> 
  7. <div class="customlinkdiv" id="customlinkdiv"> 
  8. <input type="hidden" value="custom" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-type]" /> 
  9. <p id="menu-item-url-wrap" class="wp-clearfix"> 
  10. <label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label> 
  11. <input id="custom-menu-item-url" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-url]" type="text" class="code menu-item-textbox" value="http://" /> 
  12. </p> 
  13.  
  14. <p id="menu-item-name-wrap" class="wp-clearfix"> 
  15. <label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label> 
  16. <input id="custom-menu-item-name" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-title]" type="text" class="regular-text menu-item-textbox" /> 
  17. </p> 
  18.  
  19. <p class="button-controls wp-clearfix"> 
  20. <span class="add-to-menu"> 
  21. <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" /> 
  22. <span class="spinner"></span> 
  23. </span> 
  24. </p> 
  25.  
  26. </div><!-- /.customlinkdiv --> 
  27. <?php