Ticket #34977: 34977.patch
File 34977.patch, 919 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/comment.php
1876 1876 do_action( 'wp_set_comment_status', $comment->comment_ID, $comment_status ); 1877 1877 1878 1878 wp_transition_comment_status($comment_status, $comment_old->comment_approved, $comment); 1879 1880 wp_update_comment_count($comment->comment_post_ID); 1881 1879 1880 if ( $comment->comment_post_ID ) { 1881 wp_update_comment_count($comment->comment_post_ID); 1882 } 1882 1883 return true; 1883 1884 } 1884 1885 … … 1947 1948 $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) ); 1948 1949 1949 1950 clean_comment_cache( $comment_ID ); 1950 wp_update_comment_count( $comment_post_ID ); 1951 if ( $comment_post_ID ){ 1952 wp_update_comment_count( $comment_post_ID ); 1953 } 1951 1954 /** 1952 1955 * Fires immediately after a comment is updated in the database. 1953 1956 *