rest_comment_collection_params хук-фильтр . WP 4.7.0
Filters collection parameters for the comments controller.
This filter registers the collection parameter, but does not map the collection parameter to an internal WP_Comment_Query parameter. Use the rest_comment_query filter to set WP_Comment_Query parameters.
Использование
add_filter( 'rest_comment_collection_params', 'filter_function_name_6442' ); function filter_function_name_6442( $query_params ){ // filter... return $query_params; }
- $query_params(массив)
- JSON Schema-formatted collection parameters.
Список изменений
С версии 4.7.0 | Введена. |
Где вызывается хук
rest_comment_collection_params
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 1687
return apply_filters( 'rest_comment_collection_params', $query_params );