diff --git a/src/wp-admin/comment.php b/src/wp-admin/comment.php
index c2eca11..287a215 100644
|
a
|
b
|
if ( isset( $_GET['dt'] ) ) { |
| 33 | 33 | $action = 'trash'; |
| 34 | 34 | } |
| 35 | 35 | |
| | 36 | /** Stop operation if the post associated with the comment is trashed. */ |
| | 37 | $comment_id = absint( $_GET['c'] ); |
| | 38 | $comment = get_comment( $comment_id ); |
| | 39 | if ( 'trash' === get_post_status( $comment->comment_post_ID ) ) |
| | 40 | wp_die( __( 'You can’t operate on this comment because the associated post is in the Trash. Please restore the post first, then try again.' ) ); |
| | 41 | |
| 36 | 42 | switch( $action ) { |
| 37 | 43 | |
| 38 | 44 | case 'editcomment' : |
diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index bf642ac..438b204 100644
|
a
|
b
|
class WP_List_Table { |
| 659 | 659 | printf( '<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>', |
| 660 | 660 | __( 'No comments' ) |
| 661 | 661 | ); |
| | 662 | // Approved comments AND Posts that were trashed. Hyperlinks for editing are removed. |
| | 663 | } elseif ( $approved_comments && 'trash' === get_post_status( $post_id ) ) { |
| | 664 | printf( '<span class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>', |
| | 665 | $approved_comments_number, |
| | 666 | $pending_comments ? $approved_phrase : $approved_only_phrase |
| | 667 | ); |
| 662 | 668 | // Approved comments have different display depending on some conditions. |
| 663 | 669 | } elseif ( $approved_comments ) { |
| 664 | 670 | printf( '<a href="%s" class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', |