Fix notice without breaking comment notifications. See r13150, see #11830
git-svn-id: https://develop.svn.wordpress.org/trunk@13801 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
476fcfe595
commit
d53d09ca48
@ -1274,7 +1274,7 @@ function wp_new_comment( $commentdata ) {
|
|||||||
|
|
||||||
$post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
|
$post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
|
||||||
|
|
||||||
if ( isset( $commentdata['user_id'] ) && get_option('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_id'] )
|
if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] ) )
|
||||||
wp_notify_postauthor($comment_ID, $commentdata['comment_type']);
|
wp_notify_postauthor($comment_ID, $commentdata['comment_type']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user