diff options
Diffstat (limited to 'wp-includes/comment.php')
-rw-r--r-- | wp-includes/comment.php | 5 |
1 files changed, 5 insertions, 0 deletions
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"; |