'menuItemDeletion' =>
__( 'item %s'
),
/* translators: %s: Item name. */
'itemsDeleted' =>
__( 'Deleted menu item: %s.'
),
'itemAdded' =>
__( 'Menu item added'
),
'itemRemoved' =>
__( 'Menu item removed'
),
'movedUp' =>
__( 'Menu item moved up'
),
'movedDown' =>
__( 'Menu item moved down'
),
'movedTop' =>
__( 'Menu item moved to the top'
),
'movedLeft' =>
__( 'Menu item moved out of submenu'
),
'movedRight' =>
__( 'Menu item is now a sub-item'
),
);
wp_localize_script( 'nav-menu', 'menus',
$nav_menus_l10n );
/*
* Redirect to add screen if there are no menus and this users has either zero,
* or more than 1 theme locations.
*/
if ( 0 ===
$menu_count && !
$add_new_screen && !
$one_theme_location_no_menus ) { wp_redirect( admin_url( 'nav-menus.php?action=edit&menu=0'
) );
}// Get recently edited nav menu.
$recently_edited =
absint( get_user_option( 'nav_menu_recently_edited'
) );