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:
parent
5ff8d718f2
commit
52ec03b947
@ -823,7 +823,9 @@ case 'add-menu-item' :
|
|||||||
foreach ( (array) $item_ids as $menu_item_id ) {
|
foreach ( (array) $item_ids as $menu_item_id ) {
|
||||||
$menu_obj = get_post( $menu_item_id );
|
$menu_obj = get_post( $menu_item_id );
|
||||||
if ( ! empty( $menu_obj->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 = 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 ); ?>">
|
<li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>">
|
||||||
<dl class="menu-item-bar">
|
<dl class="menu-item-bar">
|
||||||
|
Loading…
Reference in New Issue
Block a user