diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css index 5000bba965..30c8080672 100644 --- a/wp-admin/css/wp-admin.css +++ b/wp-admin/css/wp-admin.css @@ -2527,6 +2527,25 @@ table.fixed { background-repeat: no-repeat; } +tr.wp-locked .locked-indicator { + background: url('../images/lock16.png') no-repeat; + margin: -2px 0 0 8px; + height: 16px; + width: 16px; +} + +tr.wp-locked .check-column label, +tr.wp-locked .check-column input[type="checkbox"], +tr.wp-locked .row-actions .inline, +tr.wp-locked .row-actions .trash, +.lock-holder { + display: none; +} + +tr.wp-locked .lock-holder { + display: inline; +} + .fixed .column-comments .sorting-indicator { margin-top: 3px; } diff --git a/wp-admin/images/lock16.png b/wp-admin/images/lock16.png new file mode 100644 index 0000000000..8f66ac5732 Binary files /dev/null and b/wp-admin/images/lock16.png differ diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 2f47867798..f0ba11c39a 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -472,9 +472,19 @@ class WP_Posts_List_Table extends WP_List_Table { $title = _draft_or_post_title(); $post_type_object = get_post_type_object( $post->post_type ); $can_edit_post = current_user_can( $post_type_object->cap->edit_post, $post->ID ); + $lock_holder_id = wp_check_post_lock( $post->ID ); + $lock_holder = ''; $alternate = 'alternate' == $alternate ? '' : 'alternate'; $classes = $alternate . ' iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); + + if ( $lock_holder_id ) { + $classes .= ' wp-locked'; + $lock_holder_data = get_user_by( 'id', $lock_holder_id ); + + if ( $lock_holder_data ) + $lock_holder = esc_html( sprintf( __('Currently edited by %s'), $lock_holder_data->data->display_name ) ); + } ?> - + - +
+ - >post_status != 'trash' ) { ?>labels->parent_item_colon . ' ' . esc_html( $parent_name ) : ''; ?> - + >post_status != 'trash' ) { ?>labels->parent_item_colon . ' ' . esc_html( $parent_name ) : ''; ?> + post_status != 'trash' ) { + ?> + + - >post_status != 'trash' ) { ?> - + >post_status != 'trash' ) { ?> + post_status != 'trash' ) { + ?> + + ID ) ) the_excerpt(); }