Quick edit: Fix cases where the author field is empty when the user no longer has edit capabilities.

Props: OllieJones, sabernhardt, iamjaydip, costdev.
Fixes: #56819.
Built from https://develop.svn.wordpress.org/trunk@54936


git-svn-id: http://core.svn.wordpress.org/trunk@54488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2022-12-06 02:30:15 +00:00
parent 0164f0a85f
commit 867203db05
3 changed files with 3 additions and 3 deletions

View File

@ -305,7 +305,7 @@ window.wp = window.wp || {};
if ( !$(':input[name="post_author"] option[value="' + $('.post_author', rowData).text() + '"]', editRow).val() ) {
// The post author no longer has edit capabilities, so we need to add them to the list of authors.
$(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + ' .author').text() + '</option>');
$(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#post-' + id + ' .author').text() + '</option>');
}
if ( $( ':input[name="post_author"] option', editRow ).length === 1 ) {
$('label.inline-edit-author', editRow).hide();

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-54935';
$wp_version = '6.2-alpha-54936';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.