From 60f8f5a6aae5d6c26584318b45481a53f9a306f5 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 16 Mar 2010 22:01:49 +0000 Subject: [PATCH] Menu item -> append should be a key/name, not a label. see #11817 git-svn-id: http://svn.automattic.com/wordpress/trunk@13722 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/nav-menu.php | 23 +++++++++++------------ wp-includes/nav-menu-template.php | 2 +- wp-includes/nav-menu.php | 11 ++++++----- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 38fc91a953..c11cda3d60 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -21,8 +21,8 @@ function wp_nav_menu_post_type_metaboxes() { foreach ( $post_types as $post_type ) { if ( !in_array($post_type->name, $allowed_types) ) continue; - $id = sanitize_title_with_dashes( $post_type->label ); - + $id = $post_type->name; + // delete_transient( "nav_menu_items_{$post_type->name}" ); // delete_transient( "nav_menu_sub_items_{$post_type->name}" ); @@ -37,7 +37,7 @@ function wp_nav_menu_post_type_metaboxes() { */ function wp_nav_menu_taxonomy_metaboxes() { $taxonomies = get_taxonomies( array( 'show_ui' => true ), 'object' ); - + if ( !$taxonomies ) return false; @@ -45,12 +45,11 @@ function wp_nav_menu_taxonomy_metaboxes() { foreach ( $taxonomies as $tax ) { if ( !in_array($tax->name, $allowed_types) ) continue; - $id = sanitize_title_with_dashes( $tax->label ); + $id = $tax->name; - // delete_transient( "nav_menu_items_{$tax->name}" ); // delete_transient( "nav_menu_sub_items_{$tax->name}" ); - + add_meta_box( "add-{$id}", sprintf( __('Add an Existing %s'), $tax->singular_label ), 'wp_nav_menu_item_taxonomy_metabox', 'menus', 'side', 'default', $tax ); } } @@ -182,7 +181,7 @@ function wp_nav_menu_item_post_type_metabox( $object, $post_type ) { } } - $id = sanitize_title_with_dashes( $post_type['args']->label ); + $id = $post_type['args']->name; ?>

@@ -197,14 +196,14 @@ function wp_nav_menu_item_post_type_metabox( $object, $post_type ) {

    - posts, 'post_type', $post_type['args']->name ); ?> + posts, 'post_type', $id ); ?>

- +