Menus: Remove 'sub item' label when removing the sub item's parent.
Props rnoakes3rd, adamsilverstein. Fixes #37846. git-svn-id: https://develop.svn.wordpress.org/trunk@38612 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
784d45b279
commit
98e386c6f9
@ -82,9 +82,12 @@ var wpNavMenu;
|
||||
shiftDepthClass : function(change) {
|
||||
return this.each(function(){
|
||||
var t = $(this),
|
||||
depth = t.menuItemDepth();
|
||||
$(this).removeClass('menu-item-depth-'+ depth )
|
||||
.addClass('menu-item-depth-'+ (depth + change) );
|
||||
depth = t.menuItemDepth(),
|
||||
newDepth = depth + change;
|
||||
t.removeClass( 'menu-item-depth-'+ depth )
|
||||
.addClass( 'menu-item-depth-'+ ( newDepth ) );
|
||||
if ( newDepth == 0 )
|
||||
t.find( '.is-submenu' ).hide();
|
||||
});
|
||||
},
|
||||
childMenuItems : function() {
|
||||
|
Loading…
Reference in New Issue
Block a user