Post locks on the posts list screen: new icons for the lock, props empireoflight, show avatar for the user currently editing, props dh-shredder, see #23312

git-svn-id: https://develop.svn.wordpress.org/trunk@23681 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2013-03-13 00:28:07 +00:00
parent eab76eac4a
commit 631980b5fa
10 changed files with 68 additions and 50 deletions

View File

@@ -553,9 +553,15 @@ class WP_Posts_List_Table extends WP_List_Table {
echo "</strong>\n";
if ( $lock_holder && $can_edit_post && $post->post_status != 'trash' ) {
printf( '<span class="lock-holder">%s</span>',
esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) ) );
if ( $can_edit_post && $post->post_status != 'trash' ) {
if ( $lock_holder ) {
$locked_avatar = get_avatar( $lock_holder->ID, 18 );
$locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
} else {
$locked_avatar = $locked_text = '';
}
echo '<span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span>\n";
}
if ( ! $this->hierarchical_display && 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) )