Menus: Don't display "Move" text without direction if there is only one menu item.

props kucrut for initial patch.
fixes #30765.
Built from https://develop.svn.wordpress.org/trunk@31320


git-svn-id: http://core.svn.wordpress.org/trunk@31301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-02-01 05:29:26 +00:00
parent 5bc0c84c35
commit a82763b7b6
3 changed files with 5 additions and 2 deletions

View File

@ -429,6 +429,8 @@ var wpNavMenu;
totalMenuItems = $('#menu-to-edit li').length, totalMenuItems = $('#menu-to-edit li').length,
hasSameDepthSibling = menuItem.nextAll( '.menu-item-depth-' + depth ).length; hasSameDepthSibling = menuItem.nextAll( '.menu-item-depth-' + depth ).length;
menuItem.find( '.field-move' ).toggle( totalMenuItems > 1 );
// Where can they move this menu item? // Where can they move this menu item?
if ( 0 !== position ) { if ( 0 !== position ) {
thisLink = menuItem.find( '.menus-move-up' ); thisLink = menuItem.find( '.menus-move-up' );
@ -1187,6 +1189,7 @@ var wpNavMenu;
$( '.drag-instructions' ).hide(); $( '.drag-instructions' ).hide();
ins.removeClass( 'menu-instructions-inactive' ); ins.removeClass( 'menu-instructions-inactive' );
} }
api.refreshAdvancedAccessibility();
}); });
}, },

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31319'; $wp_version = '4.2-alpha-31320';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.