WordPress.org

Make WordPress Core

Ticket #8695: 8695.diff

File 8695.diff, 673 bytes (added by Denis-de-Bernardy, 6 years ago)
  • Users/denis/Sites/sem-pro/wp-includes/pluggable.php

     
    924924        $comment = get_comment($comment_id); 
    925925        $post    = get_post($comment->comment_post_ID); 
    926926        $user    = get_userdata( $post->post_author ); 
     927        $current_user = wp_get_current_user(); 
     928         
     929        if ( $current_user->ID == $user->ID ) return false; // The author moderated a comment on his own post 
    927930 
    928931        if ('' == $user->user_email) return false; // If there's no email to send the comment to 
    929932