Editor: Link suggestions: add fallback title for posts with no title.
Fixes #42664. git-svn-id: https://develop.svn.wordpress.org/trunk@42425 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d91095f34a
commit
f3d3254517
|
@ -468,8 +468,11 @@
|
|||
}
|
||||
}
|
||||
} ).autocomplete( 'instance' )._renderItem = function( ul, item ) {
|
||||
var fallbackTitle = ( typeof window.wpLinkL10n !== 'undefined' ) ? window.wpLinkL10n.noTitle : '',
|
||||
title = item.title ? item.title : fallbackTitle;
|
||||
|
||||
return $( '<li role="option" id="mce-wp-autocomplete-' + item.ID + '">' )
|
||||
.append( '<span>' + item.title + '</span> <span class="wp-editor-float-right">' + item.info + '</span>' )
|
||||
.append( '<span>' + title + '</span> <span class="wp-editor-float-right">' + item.info + '</span>' )
|
||||
.appendTo( ul );
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue