diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php
index f9cde7ecf5..5b901c3369 100644
--- a/src/wp-admin/includes/class-wp-comments-list-table.php
+++ b/src/wp-admin/includes/class-wp-comments-list-table.php
@@ -209,7 +209,7 @@ class WP_Comments_List_Table extends WP_List_Table {
$actions['unapprove'] = __( 'Unapprove' );
if ( in_array( $comment_status, array( 'all', 'moderated' ) ) )
$actions['approve'] = __( 'Approve' );
- if ( in_array( $comment_status, array( 'all', 'moderated', 'approved' ) ) )
+ if ( in_array( $comment_status, array( 'all', 'moderated', 'approved', 'trash' ) ) )
$actions['spam'] = _x( 'Mark as Spam', 'comment' );
if ( 'trash' == $comment_status )
@@ -444,11 +444,13 @@ class WP_Comments_List_Table extends WP_List_Table {
$actions['unapprove'] = "" . __( 'Unapprove' ) . '';
}
- if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
+ if ( 'spam' != $the_comment_status ) {
$actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '';
} elseif ( 'spam' == $the_comment_status ) {
$actions['unspam'] = "" . _x( 'Not Spam', 'comment' ) . '';
- } elseif ( 'trash' == $the_comment_status ) {
+ }
+
+ if ( 'trash' == $the_comment_status ) {
$actions['untrash'] = "" . __( 'Restore' ) . '';
}