WordPress.org

Make WordPress Core

Changeset 16208


Ignore:
Timestamp:
11/05/10 15:36:04 (4 years ago)
Author:
ryan
Message:

Don't fire wp_notify_postauthor() when the author moderated the comment. Props mrmist. fixes #12774

File:
1 edited

Legend:

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

    r15746 r16208  
    10031003    $post    = get_post($comment->comment_post_ID); 
    10041004    $user    = get_userdata( $post->post_author ); 
    1005  
    1006     if ( $comment->user_id == $post->post_author ) return false; // The author moderated a comment on his own post 
     1005    $moderating_user = wp_get_current_user(); 
     1006    $moderating_uid = (int) $user->id; 
     1007 
     1008 
     1009    if ( $comment->user_id == $post->post_author ) return false; // The comment was left by the author. 
     1010        
     1011    if ( $user->user_id == $moderating_uid ) return false; // The author moderated a comment on his own post 
    10071012 
    10081013    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.