diff --git a/wp-admin/comment.php b/wp-admin/comment.php index bcdc859a4..cd948ebf0 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -69,6 +69,9 @@ case 'editcomment' : if ( 'trash' == $comment->comment_approved ) comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') ); + if ( 'spam' == $comment->comment_approved ) + comment_footer_die( __('This comment is marked as Spam. Please mark it as Not Spam if you want to edit it.') ); + $comment = get_comment_to_edit( $comment_id ); include('./edit-form-comment.php'); diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index e14ad2aa7..e3dc4c48b 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -411,11 +411,10 @@ class WP_Comments_List_Table extends WP_List_Table { $actions['trash'] = "" . _x( 'Trash', 'verb' ) . ''; } - if ( 'trash' != $the_comment_status ) { + if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { $actions['edit'] = "". __( 'Edit' ) . ''; $actions['quickedit'] = '' . __( 'Quick Edit' ) . ''; - if ( 'spam' != $the_comment_status ) - $actions['reply'] = '' . __( 'Reply' ) . ''; + $actions['reply'] = '' . __( 'Reply' ) . ''; } $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );