From 7f6ecdd706b81b17a5ffb42678cebb394d7ea24d Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 18 May 2009 18:36:04 +0000 Subject: [PATCH] Don't notify post author of own comments. PrProps josephscott. fixes #8695 git-svn-id: http://svn.automattic.com/wordpress/trunk@11387 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 1e574d4949..67295e24a7 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -952,9 +952,9 @@ function wp_notify_postauthor($comment_id, $comment_type='') { $post = get_post($comment->comment_post_ID); $user = get_userdata( $post->post_author ); $current_user = wp_get_current_user(); - - if ( $current_user->ID == $user->ID ) return false; // The author moderated a comment on his own post + if ( $comment->user_id == $post->post_author ) return false; // The author moderated a comment on his own post + if ('' == $user->user_email) return false; // If there's no email to send the comment to $comment_author_domain = @gethostbyaddr($comment->comment_author_IP);