Don't show (pending) in JS mode for nav menus UI. props filosofo, fixes #13604.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-28 20:41:39 +00:00
parent 0d09181552
commit 99a0a98061
2 changed files with 5 additions and 1 deletions

View File

@ -823,7 +823,9 @@ case 'add-menu-item' :
foreach ( (array) $item_ids as $menu_item_id ) {
$menu_obj = get_post( $menu_item_id );
if ( ! empty( $menu_obj->ID ) ) {
$menu_items[] = wp_setup_nav_menu_item( $menu_obj );
$menu_obj = wp_setup_nav_menu_item( $menu_obj );
$menu_obj->label = $menu_obj->title; // don't show "(pending)" in ajax-added items
$menu_items[] = $menu_obj;
}
}

View File

@ -73,6 +73,8 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
$title = sprintf( __('%s (Pending)'), $item->title );
}
$title = empty( $item->label ) ? $title : $item->label;
?>
<li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>">
<dl class="menu-item-bar">