Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | apply_filters | 359 | /** * Filters WP_Query arguments when querying posts via the REST API. * * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug. * * Possible hook names include: * * - `rest_post_query` * - `rest_page_query` * - `rest_attachment_query` * * Enables adding extra arguments or setting defaults for a post collection request. * * @since 4.7.0 * @since 5.7.0 Moved after the `tax_query` query arg is generated. * * @link https://developer.wordpress.org/reference/classes/wp_query/ * * @param array $args Array of arguments for WP_Query. * @param WP_REST_Request $request The REST API request. */ |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | apply_filters | 1020 | /** * Filters whether a post is trashable. * * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug. * * Possible hook names include: * * - `rest_post_trashable` * - `rest_page_trashable` * - `rest_attachment_trashable` * * Pass false to disable Trash support for the post. * * @since 4.7.0 * * @param bool $supports_trash Whether the post type support trashing. * @param WP_Post $post The Post object being considered for trashing support. */ |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | apply_filters | 2608 | /** * Filters the post's schema. * * The dynamic portion of the filter, `$this->post_type`, refers to the * post type slug for the controller. * * Possible hook names include: * * - `rest_post_item_schema` * - `rest_page_item_schema` * - `rest_attachment_item_schema` * * @since 5.4.0 * * @param array $schema Item schema data. */ |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | apply_filters | 2935 | /** * Filters collection parameters for the posts controller. * * The dynamic part of the filter `$this->post_type` refers to the post * type slug for the controller. * * This filter registers the collection parameter, but does not map the * collection parameter to an internal WP_Query parameter. Use the * `rest_{$this->post_type}_query` filter to set WP_Query parameters. * * @since 4.7.0 * * @param array $query_params JSON Schema-formatted collection parameters. * @param WP_Post_Type $post_type Post type object. */ |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | apply_filters | 318 | /** * Filters get_terms() arguments when querying terms via the REST API. * * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug. * * Possible hook names include: * * - `rest_category_query` * - `rest_post_tag_query` * * Enables adding extra arguments or setting defaults for a terms * collection request. * * @since 4.7.0 * * @link https://developer.wordpress.org/reference/functions/get_terms/ * * @param array $prepared_args Array of arguments for get_terms(). * @param WP_REST_Request $request The REST API request. */ |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | apply_filters | 1193 | /** * Filters collection parameters for the terms controller. * * The dynamic part of the filter `$this->taxonomy` refers to the taxonomy * slug for the controller. * * This filter registers the collection parameter, but does not map the * collection parameter to an internal WP_Term_Query parameter. Use the * `rest_{$this->taxonomy}_query` filter to set WP_Term_Query parameters. * * @since 4.7.0 * * @param array $query_params JSON Schema-formatted collection parameters. * @param WP_Taxonomy $taxonomy Taxonomy object. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
array | $args | Array of arguments for WP_Query. |
WP_REST_Request | $request | The REST API request. |
array | $args | Array of arguments for WP_Query. |
WP_REST_Request | $request | The REST API request. |
array | $args | Array of arguments for WP_Query. |
WP_REST_Request | $request | The REST API request. |
array | $args | Array of arguments for WP_Query. |
WP_REST_Request | $request | The REST API request. |
array | $prepared_args | Array of arguments for get_terms(). |
WP_REST_Request | $request | The REST API request. |
array | $prepared_args | Array of arguments for get_terms(). |
WP_REST_Request | $request | The REST API request. |