API / Minn\Rest / CommentListArgs

CommentListArgs final class

Minn\Rest\CommentListArgs · public/minn/src/Minn/Rest/CommentListArgs.php · 34 lines

The WP_Comment_Query arguments a comment list request makes, as the reference makes them before rest_comment_query (probe rest-comment-lists): each declared parameter the request carries under its query name, an empty email and search when none is given, the orderby name mapped to the query's, the found rows counted, the posts loaded, the date bounds as one clause, the offset the page makes when none is given, and ids alone for a HEAD request.

Constants and properties

privateMAPPINGS = array ( 'author' => 'author__in', 'author_email' => 'author_email', 'author_exclude' => 'author__not_in', 'exclude' => 'comment__not_in', 'include' => 'comment__in', 'offset' => 'offset', 'order' => 'order', 'parent' => 'parent__in', 'parent_exclude' => 'parent__not_in', 'per_page' => 'number', 'post' => 'post__in', 'search' => 'search', 'status' => 'status', 'type' => 'type', )
privateORDERBY = array ( 'date' => 'comment_date', 'date_gmt' => 'comment_date_gmt', 'id' => 'comment_ID', 'include' => 'comment__in', 'post' => 'comment_post_ID', 'parent' => 'comment_parent', 'type' => 'comment_type', )

Public

staticof(WP_REST_Request $wp, array $registered, string $method): array#

The arguments before plugins see them: a parameter maps when the collection (as rest_comment_collection_params left it) still has it.

$registeredarray<string, mixed>
@return array<string, mixed>