[wp-trac] [WordPress Trac] #37846: Minor Parent Menu Item Deletion 'sub item' Issue
WordPress Trac
noreply at wordpress.org
Sat Aug 27 01:10:32 UTC 2016
#37846: Minor Parent Menu Item Deletion 'sub item' Issue
--------------------------------------------+-----------------------------
Reporter: rnoakes3rd | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 4.6
Severity: normal | Keywords:
Focuses: ui, javascript, administration |
--------------------------------------------+-----------------------------
When a top-level parent nav menu item is deleted in the admin, the direct
children still display the 'sub item' text. After some quick research, I
found that the $.fn.shiftDepthClass (line 82 of /wp-admin/js/nav-menu.js)
function could be changed a bit to resolve this:
{{{
shiftDepthClass : function(change) {
return this.each(function(){
var t = $(this),
depth = t.menuItemDepth(),
new_depth = depth + change;
t.removeClass('menu-item-depth-'+ depth )
.addClass('menu-item-depth-'+ (new_depth) );
if ( new_depth == 0 )
t.find('.is-submenu').hide();
});
}
}}}
Totally minor, but figured I would bring it up.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37846>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list