Make WordPress Core

Ticket #36784: 36784.2.diff

File 36784.2.diff, 710 bytes (added by dshanske, 8 years ago)

Didn't look closely.

  • src/wp-includes/comment.php

    diff --git src/wp-includes/comment.php src/wp-includes/comment.php
    index f579e95..e70acf0 100644
    function wp_update_comment($commentarr) { 
    20232023        $data = wp_array_slice_assoc( $data, $keys );
    20242024        $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
    20252025
     2026        // If metadata is provided, store it.
     2027        if ( isset( $data['comment_meta'] ) && is_array( $data['comment_meta'] ) ) {
     2028                foreach ( $data['comment_meta'] as $meta_key => $meta_value ) {
     2029                        update_comment_meta( $comment_ID, $meta_key, $meta_value, true );
     2030                }
     2031        }
     2032
    20262033        clean_comment_cache( $comment_ID );
    20272034        wp_update_comment_count( $comment_post_ID );
    20282035        /**