mirror of
git://develop.git.wordpress.org/
synced 2025-02-28 18:43:03 +01:00
Do not notify the post author about comments if they are no longer a member of the blog. props nickmomrick. fixes #23136
git-svn-id: https://develop.svn.wordpress.org/trunk@23294 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8175cde11a
commit
22b416ef72
@ -991,6 +991,10 @@ function wp_notify_postauthor( $comment_id, $comment_type = '' ) {
|
|||||||
$post = get_post( $comment->comment_post_ID );
|
$post = get_post( $comment->comment_post_ID );
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
|
|
||||||
|
// The post author is no longer a member of the blog
|
||||||
|
if ( ! is_user_member_of_blog( $post->post_author ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
// The comment was left by the author
|
// The comment was left by the author
|
||||||
if ( $comment->user_id == $post->post_author )
|
if ( $comment->user_id == $post->post_author )
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user