Ticket #36302: 36302.2.diff
| File 36302.2.diff, 1.1 KB (added by , 9 years ago) |
|---|
-
src/wp-includes/comment.php
2025 2025 $comment_post_ID = $data['comment_post_ID']; 2026 2026 $keys = array( 'comment_post_ID', 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_type', 'comment_parent', 'user_id', 'comment_agent', 'comment_author_IP' ); 2027 2027 $data = wp_array_slice_assoc( $data, $keys ); 2028 2029 /** 2030 * Filters the comment data immediately before it is updated in the database. 2031 * 2032 * Note: data being passed to the filter is already unslashed. 2033 * 2034 * @since 4.7.0 2035 * 2036 * @param string $data The new, processed comment data. 2037 * @param string $comment The old, unslashed comment data. 2038 * @param string $commentarr The new, raw comment data. 2039 */ 2040 $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr ); 2041 2028 2042 $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) ); 2029 2043 2030 2044 clean_comment_cache( $comment_ID );