diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 8bb2e9eb3c..ae759c04f5 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -2186,8 +2186,6 @@ function wp_update_comment($commentarr) { $comment_ID = $data['comment_ID']; $comment_post_ID = $data['comment_post_ID']; - $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' ); - $data = wp_array_slice_assoc( $data, $keys ); /** * Filters the comment data immediately before it is updated in the database. @@ -2202,6 +2200,9 @@ function wp_update_comment($commentarr) { */ $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr ); + $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' ); + $data = wp_array_slice_assoc( $data, $keys ); + $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) ); clean_comment_cache( $comment_ID ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 1ae5b667f8..82572103ae 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7.1-alpha-39634'; +$wp_version = '4.7.1-alpha-39641'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.