CommentPages final class
Minn\Runtime\CommentPages · public/minn/src/Minn/Runtime/CommentPages.php · 115 lines
Which page of a post's comments a comment falls on, and the link that opens it there, as the reference works them out (probe comment-pages): the page size from the arguments, the comments_per_page query variable or the option (no pages at all when comments are not paged); a reply takes its top-level comment's page while comments are threaded; a page is the count of older top-level comments over the page size. The default page loses its number when the oldest comments come first.
Constants and properties
| private | DEFAULTS = array ( 'type' => 'all', 'page' => '', 'per_page' => '', 'max_depth' => '', ) |
Public
| static | pageOf(mixed $commentId, array $args): ?int# | The page a comment is on, through get_page_of_comment (handed the arguments as settled and as given); a threaded reply answers with its top-level comment's page. Null for a comment that is not there.
| |||
| static | linkPage(?WP_Comment $comment, array $args): mixed# | The page a comment's link names (before get_comment_link): the one asked for, the loop's, or the comment's own; '' for the default page when the oldest comments come first.
| |||
| static | shown(mixed $cpage): mixed# | The comments page being shown (the cpage query variable) as the list's links and reply links name it: '' for the default page when the oldest comments come first. | |||
| static | link(string $permalink, mixed $page): string# | A post's link opened at a page of its comments, as pretty or plain links write it. |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | olderQuery(WP_Comment $comment, array $args): array# |
|
Nothing matches.