From c9b3f35a83f68d6c114fca6d59e66591da92dedc Mon Sep 17 00:00:00 2001 From: matt Date: Tue, 30 Aug 2005 23:17:42 +0000 Subject: [PATCH] Fixes #1578 for 1.6 git-svn-id: http://svn.automattic.com/wordpress/trunk@2827 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable-functions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index 63fe56f472..332ab6f3d8 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -221,7 +221,6 @@ function wp_notify_postauthor($comment_id, $comment_type='') { $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1"); $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1"); - $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1"); if ('' == $user->user_email) return false; // If there's no email to send the comment to @@ -268,6 +267,10 @@ function wp_notify_postauthor($comment_id, $comment_type='') { . "$from\n" . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n"; + $notify_message = apply_filters('comment_notification_text', $notify_message); + $subject = apply_filters('comment_notification_subject', $subject); + $message_headers = apply_filters('comment_notification_headers', $message_headers); + @wp_mail($user->user_email, $subject, $notify_message, $message_headers); return true; @@ -305,7 +308,10 @@ function wp_notify_moderator($comment_id) { $notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n"; $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_settings('blogname'), $post->post_title ); - $admin_email = get_settings("admin_email"); + $admin_email = get_settings('admin_email'); + + $notify_message = apply_filters('comment_moderation_text', $notify_message); + $subject = apply_filters('comment_moderation_subject', $subject); @wp_mail($admin_email, $subject, $notify_message);