rest_comment_collection_params
apply_filters( ‘rest_comment_collection_params’, array $query_params )
过滤器::为comments控制器筛选集合参数。
Filter Hook: Filter collection parameters for the comments controller.
说明(Description)
此筛选器注册集合参数,但不将集合参数映射到内部WP_Comment_Query参数。使用rest_comment_query过滤器设置WP_comment_query参数。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$query_params | (array) | JSON模式格式化的集合参数。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.7.0 | wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php:1689 | 1 | 0 |
rest_comment_collection_params 为WP2原创文章,链接:https://www.wp2.cn/hook/rest_comment_collection_params/