Make WordPress Core

Ticket #36784: 36784.diff

File 36784.diff, 740 bytes (added by dshanske, 9 years ago)
  • 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( $commentdata['comment_meta'] ) && is_array( $commentdata['comment_meta'] ) ) {
     2028                foreach ( $commentdata['comment_meta'] as $meta_key => $meta_value ) {
     2029                        update_comment_meta( $comment->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        /**