Ticket #16365: 16365v4.diff
File 16365v4.diff, 1.0 KB (added by , 13 years ago) |
---|
-
wp-includes/comment.php
1317 1317 * @uses wp_filter_comment() Used to filter comment before adding comment. 1318 1318 * @uses wp_allow_comment() checks to see if comment is approved. 1319 1319 * @uses wp_insert_comment() Does the actual comment insertion to the database. 1320 * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object 1320 1321 * 1321 1322 * @param array $commentdata Contains information on the comment. 1322 1323 * @return int The ID of the comment after adding. … … 1347 1348 $comment_ID = wp_insert_comment($commentdata); 1348 1349 1349 1350 do_action('comment_post', $comment_ID, $commentdata['comment_approved']); 1351 wp_transition_comment_status($commentdata['comment_approved'], 'new', (object)$commentdata); 1350 1352 1351 1353 if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching 1352 1354 if ( '0' == $commentdata['comment_approved'] )