mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Customize: Ensure nav menu items lacking a label use the title from the original object.
Use original title as placeholder for label and in control title. Prevent original title from overriding empty label in initial setting values. Fixes #38015. git-svn-id: https://develop.svn.wordpress.org/trunk@38618 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1397,14 +1397,14 @@
|
||||
}
|
||||
|
||||
var titleEl = control.container.find( '.menu-item-title' ),
|
||||
titleText = item.title || api.Menus.data.l10n.untitled;
|
||||
titleText = item.title || item.original_title || api.Menus.data.l10n.untitled;
|
||||
|
||||
if ( item._invalid ) {
|
||||
titleText = api.Menus.data.l10n.invalidTitleTpl.replace( '%s', titleText );
|
||||
}
|
||||
|
||||
// Don't update to an empty title.
|
||||
if ( item.title ) {
|
||||
if ( item.title || item.original_title ) {
|
||||
titleEl
|
||||
.text( titleText )
|
||||
.removeClass( 'no-title' );
|
||||
|
||||
Reference in New Issue
Block a user