case 'blog':
$comment_modified_date =
$wpdb->
get_var( "SELECT comment_date FROM
$wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1"
);
break;
case 'server':
$add_seconds_server =
gmdate( 'Z'
);
$comment_modified_date =
$wpdb->
get_var( $wpdb->
prepare( "SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM
$wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1",
$add_seconds_server ) );
break;
} if ( $comment_modified_date ) { wp_cache_set( $key,
$comment_modified_date, 'timeinfo'
);
return $comment_modified_date;
} return false;
}/**
* Retrieves the total comment counts for the whole site or a single post.
*
* @since 2.0.0
*
* @param int $post_id Optional. Restrict the comment counts to the given post. Default 0, which indicates that
* comment counts for the whole site will be retrieved.
* @return int[] {
* The number of comments keyed by their status.
*
* @type int $approved The number of approved comments.
* @type int $awaiting_moderation The number of comments awaiting moderation (a.k.a. pending).
* @type int $spam The number of spam comments.
* @type int $trash The number of trashed comments.
* @type int $post-trashed The number of comments for posts that are in the trash.
* @type int $total_comments The total number of non-trashed comments, including spam.
* @type int $all The total number of pending or approved comments.
* }
*/