Ticket #23231: comment.diff
File comment.diff, 801 bytes (added by , 10 years ago) |
---|
-
wp-includes/comment.php
1730 1730 * @return int The ID of the comment after adding. 1731 1731 */ 1732 1732 function wp_new_comment( $commentdata ) { 1733 // normalize user_ID before sending to the preprocess_comment filter 1734 // this way, anything hooked to the filter won't have to do this themselves. 1735 if ( isset( $commentdata['user_ID'] ) ) { 1736 $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; 1737 } elseif ( isset( $commentdata['user_id'] ) ) { 1738 $commentdata['user_id'] = (int) $commentdata['user_id']; 1739 } 1740 1733 1741 /** 1734 1742 * Filter a comment's data before it is sanitized and inserted into the database. 1735 1743 *