Editor: Link suggestions: add fallback title for posts with no title.

Fixes #42664.

Built from https://develop.svn.wordpress.org/trunk@42425


git-svn-id: http://core.svn.wordpress.org/trunk@42256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia
2018-01-02 18:11:52 +00:00
parent 502dcd51a4
commit 4e5215deec
4 changed files with 6 additions and 3 deletions

View File

@@ -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>&nbsp;<span class="wp-editor-float-right">' + item.info + '</span>' )
.append( '<span>' + title + '</span>&nbsp;<span class="wp-editor-float-right">' + item.info + '</span>' )
.appendTo( ul );
};

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42424';
$wp_version = '5.0-alpha-42425';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.