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:
parent
0d09181552
commit
99a0a98061
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue