Make WordPress Core

Changeset 54936


Ignore:
Timestamp:
12/06/2022 02:28:59 AM (22 months ago)
Author:
azaozz
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/inline-edit-post.js

    r53352 r54936  
    306306
    307307            // The post author no longer has edit capabilities, so we need to add them to the list of authors.
    308             $(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + ' .author').text() + '</option>');
     308            $(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#post-' + id + ' .author').text() + '</option>');
    309309        }
    310310        if ( $( ':input[name="post_author"] option', editRow ).length === 1 ) {
Note: See TracChangeset for help on using the changeset viewer.