rest_{$this->post_type}_collection_params
目录
apply_filters( “rest_{$this->post_type}_collection_params”, array $query_params , WP_Post_Type $post_type )
过滤器::posts控制器的筛选集合参数。Filter Hook: Filter collection parameters for the posts controller.
说明(Description)
过滤器的动态部分$this->post_type是指控制器的post类型slug。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$query_params | (array) | JSON模式格式化的集合参数。 |
$post_type | (WP_Post_Type) | Post类型对象。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.7.0 | wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:2760 | 1 | 0 |
总计 0 评论