You appear to be a bot. Output may be restricted
Description
Get the most recent timestamp among approved comments for the given post_id.
Usage
$int = Jetpack_Sitemap_Librarian::query_latest_approved_comment_time_on_post( $post_id );
Parameters
- $post_id
- ( int ) required – Post identifier.
Returns
int Timestamp in 'Y-m-d h:i:s' format (UTC) of the most recent comment on the given post, or null if no such comments exist.
Source
File name: jetpack/modules/sitemaps/sitemap-librarian.php
Lines:
1 to 12 of 12
public function query_latest_approved_comment_time_on_post( $post_id ) { global $wpdb; return $wpdb->get_var( $wpdb->prepare( "SELECT MAX(comment_date_gmt) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND comment_type in ( '', 'comment' )", $post_id ) ); }