mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Only show top-level items when adding pages to a User's First Nav Menu. (This is also the title of Dave's first children's book.)
props lessbloat. fixes #25122. Built from https://develop.svn.wordpress.org/trunk@25622 git-svn-id: http://core.svn.wordpress.org/trunk@25539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0e959f06dc
commit
8896aab690
@ -178,6 +178,11 @@ var wpNavMenu;
|
||||
var t = $(this),
|
||||
listItemDBIDMatch = re.exec( t.attr('name') ),
|
||||
listItemDBID = 'undefined' == typeof listItemDBIDMatch[1] ? 0 : parseInt(listItemDBIDMatch[1], 10);
|
||||
|
||||
// Only show top level items
|
||||
if (0 !== t.closest('ul.children').length)
|
||||
return;
|
||||
|
||||
if ( this.className && -1 != this.className.indexOf('add-to-top') )
|
||||
processMethod = api.addMenuItemToTop;
|
||||
menuItems[listItemDBID] = t.closest('li').getItemData( 'add-menu-item', listItemDBID );
|
||||
|
2
wp-admin/js/nav-menu.min.js
vendored
2
wp-admin/js/nav-menu.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user