API / Minn\Runtime / CommentFeedQuery

CommentFeedQuery final class

Minn\Runtime\CommentFeedQuery · public/minn/src/Minn/Runtime/CommentFeedQuery.php · 50 lines

The comments a comments feed's main query carries, as the reference finds them (probe comment-feed-query). For a listing (the site's, an archive's, a search's) they come before its posts, which are then narrowed to the posts those comments are on; for a single post they come after it. Either way the comment_feed_* filters shape the query (handed the WP_Query), only approved comments that are not notes count, newest first, as many as a feed carries.

Used by 1

Public

staticlisting(WP_Query $query, Minn\Runtime\PostQueryParts $parts, object $wpdb): void#

A listing's comments, then its posts narrowed to theirs: the posts query's join and where as they stand after posts_join.

staticsingle(WP_Query $query, object $wpdb): void#

A single post's comments, once the query has found the post.

Internals 2

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privaterequest(WP_Query $query, string $join, string $where, string $groupby, string $select): string#

The request, its pieces through the comment_feed_* filters.

privatekeep(WP_Query $query, array $rows): void#
$rowslist<mixed>rows or ids, each made a WP_Comment