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

git-svn-id: https://develop.svn.wordpress.org/trunk@15047 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-28 20:41:39 +00:00
parent 5ff8d718f2
commit 52ec03b947
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">