From afcf5d8f37500b006e84ea04b60c5a5be5fe370a Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 28 Feb 2008 07:04:52 +0000 Subject: [PATCH] Add unapprove button git-svn-id: http://svn.automattic.com/wordpress/trunk@7083 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-comments.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 ) + + +