Make WordPress Core

Ticket #19901: 19901.3.diff

File 19901.3.diff, 954 bytes (added by peterwilsoncc, 3 years ago)
  • src/wp-includes/comment.php

    diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
    index 50e0082283..bf75246383 100644
    a b function get_lastcommentmodified( $timezone = 'server' ) { 
    358358/**
    359359 * Retrieves the total comment counts for the whole site or a single post.
    360360 *
    361  * Unlike wp_count_comments(), this function always returns the live comment counts without caching.
    362  *
    363361 * @since 2.0.0
    364362 *
    365  * @global wpdb $wpdb WordPress database abstraction object.
    366  *
    367363 * @param int $post_id Optional. Restrict the comment counts to the given post. Default 0, which indicates that
    368364 *                     comment counts for the whole site will be retrieved.
    369365 * @return int[] {
    function get_lastcommentmodified( $timezone = 'server' ) { 
    379375 * }
    380376 */
    381377function get_comment_count( $post_id = 0 ) {
    382         global $wpdb;
    383 
    384378        $post_id = (int) $post_id;
    385379
    386380        $comment_count = array(