diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php
index 4c90a78d90..f3a894d90c 100644
--- a/wp-admin/edit-comments.php
+++ b/wp-admin/edit-comments.php
@@ -9,7 +9,7 @@ wp_enqueue_script('admin-forms');
if ( !empty( $_REQUEST['delete_comments'] ) ) {
check_admin_referer('bulk-comments');
- $comments_deleted = $comments_approved = $comments_spammed = 0;
+ $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0;
foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each
$comment = (int) $comment;
$post_id = (int) $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment");
@@ -25,9 +25,12 @@ if ( !empty( $_REQUEST['delete_comments'] ) ) {
} elseif ( !empty( $_REQUEST['approveit'] ) ) {
wp_set_comment_status($comment, 'approve');
$comments_approved++;
+ } elseif ( !empty( $_REQUEST['unapproveit'] ) ) {
+ wp_set_comment_status($comment, 'hold');
+ $comments_unapproved++;
}
endforeach;
- $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed;
+ $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed . '&unapproved=' . $comments_unapproved;
if ( !empty($_REQUEST['mode']) )
$redirect_to = add_query_arg('mode', $_REQUEST['mode'], $redirect_to);
if ( !empty($_REQUEST['comment_status']) )
@@ -161,6 +164,9 @@ if ( $page_links )
+
+
+