diff --git src/wp-includes/comment.php src/wp-includes/comment.php
index ef4b553..9013993 100644
|
|
function wp_update_comment($commentarr) { |
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 | * Filter the comment before it is updated in the database. |
| 2030 | * Data being passed to the filter is already unslashed. |
| 2031 | * |
| 2032 | * @since 4.7.0 |
| 2033 | * |
| 2034 | * @param string $data The comment waiting to enter the database. |
| 2035 | * @param string $comment The old comment data |
| 2036 | * @param string $commentarr The new comment data |
| 2037 | */ |
| 2038 | $data = apply_filters( 'pre_update_comment', $data, $comment, $commentarr); |
| 2039 | |
2028 | 2040 | $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) ); |
2029 | 2041 | |
2030 | 2042 | clean_comment_cache( $comment_ID ); |