diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index f4948975b..44f2b7907 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -164,6 +164,7 @@ class WP_Media_List_Table extends WP_List_Table { $alt = ''; while ( have_posts() ) : the_post(); + $user_can_edit = current_user_can( 'edit_post', $post->ID ); if ( $this->is_trash && $post->post_status != 'trash' || !$this->is_trash && $post->post_status == 'trash' ) @@ -190,7 +191,11 @@ foreach ( $columns as $column_name => $column_display_name ) { case 'cb': ?> - ID ) ) { ?> + + + + + $column_display_name ) { ?> >ID, array( 80, 60 ), true ) ) { - if ( $this->is_trash ) { + if ( $this->is_trash || ! $user_can_edit ) { echo $thumb; } else { ?> @@ -216,7 +221,15 @@ foreach ( $columns as $column_name => $column_display_name ) { case 'title': ?> - >is_trash ) echo $att_title; else { ?> + > + is_trash || ! $user_can_edit ) { + echo $att_title; + } else { ?> + + +

ID ), $matches ) ) @@ -288,15 +301,25 @@ foreach ( $columns as $column_name => $column_display_name ) { $title =_draft_or_post_title( $post->post_parent ); } ?> - > - , + > + post_parent ) ) { ?> + + + , >
- + + + +