diff --git src/wp-includes/comment.php src/wp-includes/comment.php
index 8bb2e9e..ead3377 100644
|
|
|
function wp_update_comment($commentarr) {
|
| 2186 | 2186 | |
| 2187 | 2187 | $comment_ID = $data['comment_ID']; |
| 2188 | 2188 | $comment_post_ID = $data['comment_post_ID']; |
| 2189 | | $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' ); |
| 2190 | | $data = wp_array_slice_assoc( $data, $keys ); |
| 2191 | 2189 | |
| 2192 | 2190 | /** |
| 2193 | 2191 | * Filters the comment data immediately before it is updated in the database. |
| … |
… |
function wp_update_comment($commentarr) {
|
| 2201 | 2199 | * @param array $commentarr The new, raw comment data. |
| 2202 | 2200 | */ |
| 2203 | 2201 | $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr ); |
| 2204 | | |
| 2205 | | $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) ); |
| | 2202 | |
| | 2203 | $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' ); |
| | 2204 | |
| | 2205 | $sliced_data = wp_array_slice_assoc( $data, $keys ); |
| | 2206 | $rval = $wpdb->update( $wpdb->comments, $sliced_data, compact( 'comment_ID' ) ); |
| 2206 | 2207 | |
| 2207 | 2208 | clean_comment_cache( $comment_ID ); |
| 2208 | 2209 | wp_update_comment_count( $comment_post_ID ); |