WordPress.org

Make WordPress Core

Ticket #16365: 16365v3.diff

File 16365v3.diff, 591 bytes (added by MattyRob, 7 years ago)
  • wp-includes/comment.php

     
    13471347        $comment_ID = wp_insert_comment($commentdata);
    13481348
    13491349        do_action('comment_post', $comment_ID, $commentdata['comment_approved']);
     1350        wp_transition_comment_status($commentdata['comment_approved'], 'new', (object)$commentdata);
    13501351
    13511352        if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching
    13521353                if ( '0' == $commentdata['comment_approved'] )