Make WordPress Core

Changeset 63061 for trunk


Ignore:
Timestamp:
08/06/2026 03:31:46 PM (7 weeks ago)
Author:
johnbillion
Message:

Administration: When wp_is_large_user_count(), ensure that the post author is always added to author dropdown.

Props lucasbustamante, jeremyfelt, jonsurrell.

File:
1 edited

Legend:

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

    r62839 r63061  
    360360
    361361                        // The post author no longer has edit capabilities, so we need to add them to the list of authors.
    362                         $(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#post-' + id + ' .author').text() + '</option>');
     362                        $(':input[name="post_author"]', editRow).prepend(
     363                                new Option(
     364                                        $('#post-' + id + ' .author').text(),
     365                                        $('.post_author', rowData).text()
     366                                )
     367                        );
    363368                }
    364369                if ( $( ':input[name="post_author"] option', editRow ).length === 1 ) {
Note: See TracChangeset for help on using the changeset viewer.