Ticket #12774: dont_notify_author.patch
File dont_notify_author.patch, 941 bytes (added by , 13 years ago) |
---|
-
wp-includes/pluggable.php
1004 1004 $comment = get_comment($comment_id); 1005 1005 $post = get_post($comment->comment_post_ID); 1006 1006 $user = get_userdata( $post->post_author ); 1007 $moderating_user = wp_get_current_user(); 1008 $moderating_uid = (int) $user->id; 1007 1009 1008 if ( $comment->user_id == $post->post_author ) return false; // The author moderated a comment on his own post1009 1010 1011 if ( $comment->user_id == $post->post_author ) return false; // The comment was left by the author. 1012 1013 if ( $user->user_id == $moderating_uid ) return false;// The author moderated a comment on his own post 1014 1010 1015 if ('' == $user->user_email) return false; // If there's no email to send the comment to 1011 1016 1012 1017 $comment_author_domain = @gethostbyaddr($comment->comment_author_IP);