Editor: Link suggestions: add fallback title for posts with no title.
Props afercia. Merges [42425] to the 4.9 branch. Fixes #42664. Built from https://develop.svn.wordpress.org/branches/4.9@42439 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
089aa052fb
commit
b8ebacbf82
|
@ -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 );
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue