WordPress.org

Make WordPress Core

Ticket #16365: 16365.diff

File 16365.diff, 584 bytes (added by MattyRob, 10 years ago)
  • comment.php

     
    13361336        $comment_ID = wp_insert_comment($commentdata);
    13371337
    13381338        do_action('comment_post', $comment_ID, $commentdata['comment_approved']);
     1339        $new_status = $commentdata['comment_approved'];
     1340        wp_transition_comment_status($new_status, 'new', (object)$commentdata);
    13391341
    13401342        if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching
    13411343                if ( '0' == $commentdata['comment_approved'] )