From 310940b824eff4a116dcd72ccd339bb602021981 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 10 Jun 2008 14:08:54 +0000 Subject: Merge with branches/2.5 in WordPress, revision 8066 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1324 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/comment.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wp-includes/comment.php') diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 63e6b1b..57af654 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -726,6 +726,11 @@ function wp_set_comment_status($comment_id, $comment_status) { break; case 'approve': $query = "UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID='$comment_id' LIMIT 1"; + if ( get_option('comments_notify') ) { + $comment = get_comment($comment_id); + wp_notify_postauthor($comment_id, $comment->comment_type); + } + break; case 'spam': $query = "UPDATE $wpdb->comments SET comment_approved='spam' WHERE comment_ID='$comment_id' LIMIT 1"; -- cgit