Don't notify post author of own comments. PrProps josephscott. fixes #8695

git-svn-id: https://develop.svn.wordpress.org/trunk@11387 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-05-18 18:36:04 +00:00
parent 8f2d1010bb
commit c06ab49bcf

View File

@ -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);