WordPress.org

Make WordPress Core

Changeset 11057


Ignore:
Timestamp:
04/22/2009 08:55:04 PM (9 years ago)
Author:
ryan
Message:

Don't notify post author of own comments. Props Denis-de-Bernardy. fixes #8695

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r11033 r11057  
    939939    $post    = get_post($comment->comment_post_ID);
    940940    $user    = get_userdata( $post->post_author );
     941    $current_user = wp_get_current_user();
     942   
     943    if ( $current_user->ID == $user->ID ) return false; // The author moderated a comment on his own post
    941944
    942945    if ('' == $user->user_email) return false; // If there's no email to send the comment to
Note: See TracChangeset for help on using the changeset viewer.