mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Don't notify post author of own comments. Props Denis-de-Bernardy. fixes #8695
git-svn-id: http://svn.automattic.com/wordpress/trunk@11057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e9ab4ba39d
commit
6db7e7fbc5
@ -938,6 +938,9 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
|
||||
$comment = get_comment($comment_id);
|
||||
$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 ('' == $user->user_email) return false; // If there's no email to send the comment to
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user