diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 92e4e9e8c7..04f92cda9f 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -647,11 +647,9 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
comment_post_ID) ) {
- $actions['spam'] = " | ';
- $actions['delete'] = " | ';
- $actions['approve'] = "';
- $actions['unapprove'] = "';
+
+ $actions['approve'] = " | ';
+ $actions['unapprove'] = " | ';
// we're looking at list of only approved or only unapproved comments
if ( 'moderated' == $comment_status ) {
@@ -662,6 +660,9 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
unset($actions['approve']);
}
+ if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
+ $actions['spam'] = " | ';
+ $actions['delete'] = "';
foreach ( $actions as $action => $link )
echo "$link";
}