wp core update 6.6
This commit is contained in:
@@ -449,12 +449,13 @@
|
||||
}
|
||||
|
||||
var thisLink, thisLinkText, primaryItems, itemPosition, title,
|
||||
parentItem, parentItemId, parentItemName, subItems,
|
||||
parentItem, parentItemId, parentItemName, subItems, totalSubItems,
|
||||
$this = $( itemToRefresh ),
|
||||
menuItem = $this.closest( 'li.menu-item' ).first(),
|
||||
depth = menuItem.menuItemDepth(),
|
||||
isPrimaryMenuItem = ( 0 === depth ),
|
||||
itemName = $this.closest( '.menu-item-handle' ).find( '.menu-item-title' ).text(),
|
||||
menuItemType = $this.closest( '.menu-item-handle' ).find( '.item-controls' ).find( '.item-type' ).text(),
|
||||
position = parseInt( menuItem.index(), 10 ),
|
||||
prevItemDepth = ( isPrimaryMenuItem ) ? depth : parseInt( depth - 1, 10 ),
|
||||
prevItemNameLeft = menuItem.prevAll('.menu-item-depth-' + prevItemDepth).first().find( '.menu-item-title' ).text(),
|
||||
@@ -503,18 +504,22 @@
|
||||
primaryItems = $( '.menu-item-depth-0' ),
|
||||
itemPosition = primaryItems.index( menuItem ) + 1,
|
||||
totalMenuItems = primaryItems.length,
|
||||
|
||||
// String together help text for primary menu items.
|
||||
title = menus.menuFocus.replace( '%1$s', itemName ).replace( '%2$d', itemPosition ).replace( '%3$d', totalMenuItems );
|
||||
title = menus.menuFocus.replace( '%1$s', itemName ).replace( '%2$s', menuItemType ).replace( '%3$d', itemPosition ).replace( '%4$d', totalMenuItems );
|
||||
} else {
|
||||
parentItem = menuItem.prevAll( '.menu-item-depth-' + parseInt( depth - 1, 10 ) ).first(),
|
||||
parentItemId = parentItem.find( '.menu-item-data-db-id' ).val(),
|
||||
parentItemName = parentItem.find( '.menu-item-title' ).text(),
|
||||
subItems = $( '.menu-item .menu-item-data-parent-id[value="' + parentItemId + '"]' ),
|
||||
totalSubItems = subItems.length,
|
||||
itemPosition = $( subItems.parents('.menu-item').get().reverse() ).index( menuItem ) + 1;
|
||||
|
||||
// String together help text for sub menu items.
|
||||
title = menus.subMenuFocus.replace( '%1$s', itemName ).replace( '%2$d', itemPosition ).replace( '%3$s', parentItemName );
|
||||
if ( depth < 2 ) {
|
||||
title = menus.subMenuFocus.replace( '%1$s', itemName ).replace( '%2$s', menuItemType ).replace( '%3$d', itemPosition ).replace( '%4$d', totalSubItems ).replace( '%5$s', parentItemName );
|
||||
} else {
|
||||
title = menus.subMenuMoreDepthFocus.replace( '%1$s', itemName ).replace( '%2$s', menuItemType ).replace( '%3$d', itemPosition ).replace( '%4$d', totalSubItems ).replace( '%5$s', parentItemName ).replace( '%6$d', depth );
|
||||
}
|
||||
}
|
||||
|
||||
$this.attr( 'aria-label', title );
|
||||
@@ -732,6 +737,7 @@
|
||||
|
||||
api.refreshKeyboardAccessibility();
|
||||
api.refreshAdvancedAccessibility();
|
||||
api.refreshAdvancedAccessibilityOfItem( ui.item.find( 'a.item-edit' ) );
|
||||
},
|
||||
change: function(e, ui) {
|
||||
// Make sure the placeholder is inside the menu.
|
||||
|
||||
Reference in New Issue
Block a user