WordPress.org

Make WordPress Core

Changeset 17284


Ignore:
Timestamp:
01/13/2011 07:14:12 AM (8 years ago)
Author:
markjaquith
Message:

Show the author dropdown in quick edit even when there is only one contributor-or-higher user and the post belongs to someone who no longer has contributor-or-higher access. fixes #14420

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r17278 r17284  
    765765            if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) :
    766766                $users_opt = array(
    767                     'hide_if_only_one_author' => true,
     767                    'hide_if_only_one_author' => false,
    768768                    'who' => 'authors',
    769769                    'name' => 'post_author',
     
    776776
    777777                if ( $authors = wp_dropdown_users( $users_opt ) ) :
    778                     $authors_dropdown  = '<label>';
     778                    $authors_dropdown  = '<label class="inline-edit-author">';
    779779                    $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
    780780                    $authors_dropdown .= $authors;
  • trunk/wp-admin/js/inline-edit-post.dev.js

    r15491 r17284  
    146146            // author no longer has edit caps, so we need to add them to the list of authors
    147147            $(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + ' .author').text() + '</option>');
     148        }
     149        if ( $(':input[name="post_author"] option', editRow).length == 1 ) {
     150            $('label.inline-edit-author', editRow).hide();
    148151        }
    149152
Note: See TracChangeset for help on using the changeset viewer.