Customize: Ensure a newly-added custom link nav menu item has the appropriate CSS class names.

For nav menu items of the `custom` type, their `object` should also be set to `custom`, so that the `menu-item-custom` class name will be added.

Props vishalkakadiya.
Fixes #37575.


git-svn-id: https://develop.svn.wordpress.org/trunk@38301 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2016-08-22 03:11:51 +00:00
parent 99b6d24042
commit 4c137392c8

View File

@ -446,7 +446,7 @@
'url': itemUrl.val(), 'url': itemUrl.val(),
'type': 'custom', 'type': 'custom',
'type_label': api.Menus.data.l10n.custom_label, 'type_label': api.Menus.data.l10n.custom_label,
'object': '' 'object': 'custom'
}; };
this.currentMenuControl.addItemToMenu( menuItem ); this.currentMenuControl.addItemToMenu( menuItem );