ID, 'meta-box-hidden_nav-menus', $hidden_meta_boxes );
// returns all the hidden metaboxes to the js function: wpNavMenu.initial_meta_boxes()
return join( ',', $hidden_meta_boxes );
}
}
/**
* Creates metaboxes for any post type menu item.
*
* @since 3.0.0
*/
function wp_nav_menu_post_type_metaboxes() {
$post_types = get_post_types( array( 'public' => true ), 'object' );
if ( !$post_types )
return;
foreach ( $post_types as $post_type ) {
$id = $post_type->name;
add_meta_box( "add-{$id}", sprintf( __('Add an Existing %s'), $post_type->singular_label ), 'wp_nav_menu_item_post_type_metabox', 'nav-menus', 'side', 'default', $post_type );
}
}
/**
* Creates metaboxes for any taxonomy menu item.
*
* @since 3.0.0
*/
function wp_nav_menu_taxonomy_metaboxes() {
$taxonomies = get_taxonomies( array( 'show_ui' => true ), 'object' );
if ( !$taxonomies )
return;
foreach ( $taxonomies as $tax ) {
$id = $tax->name;
add_meta_box( "add-{$id}", sprintf( __('Add an Existing %s'), $tax->singular_label ), 'wp_nav_menu_item_taxonomy_metabox', 'nav-menus', 'side', 'default', $tax );
}
}
/**
* Displays a metabox for managing the active menu being edited.
*
* @since 3.0.0
*/
function wp_nav_menu_manage_menu_metabox( $object, $menu ) { ?>
'nav_menu_item', 'post_status' => 'any', 'meta_key' => '_menu_item_type', 'numberposts' => -1, 'orderby' => 'title', );
// @todo transient caching of these results with proper invalidation on updating links
$links = get_posts( $args );
?>
$post_type['args']->name, 'numberposts' => -1, 'orderby' => 'title', );
// @todo transient caching of these results with proper invalidation on updating of a post of this type
$posts = get_posts( $args );
if ( !$posts )
$error = '