Make WordPress Core


Ignore:
Timestamp:
01/07/2016 03:54:05 AM (9 years ago)
Author:
boonebgorges
Message:

Allow comment agent and author IP to be set via wp_update_comment().

Props adamsilverstein, welcher.
Fixes #35276.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r36139 r36215  
    19401940    $comment_ID = $data['comment_ID'];
    19411941    $comment_post_ID = $data['comment_post_ID'];
    1942     $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' );
     1942    $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' );
    19431943    $data = wp_array_slice_assoc( $data, $keys );
    19441944    $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
Note: See TracChangeset for help on using the changeset viewer.