diff --git a/wp-admin/comment.php b/wp-admin/comment.php index 4f913e073b..31c9de60d3 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -83,6 +83,12 @@ case 'spam' : die(); } + // No need to re-approve/re-trash/re-spam a comment. + if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) { + wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) ); + die(); + } + require_once('admin-header.php'); $formaction = $action . 'comment'; @@ -116,8 +122,24 @@ switch ( $action ) { $button = __('Approve Comment'); break; } -?> +if ( $comment->comment_approved != '0' ) { // if not unapproved + $message = ''; + switch ( $comment->comment_approved ) { + case '1' : + $message = __('This comment is currently approved.'); + break; + case 'spam' : + $message = __('This comment is currently marked as spam.'); + break; + case 'trash' : + $message = __('This comment is currently in the Trash.'); + break; + } + if ( $message ) + echo '
' . $message . '