Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | apply_filters | 1392 | /** * Filters a post before it is inserted 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_pre_insert_post` * - `rest_pre_insert_page` * - `rest_pre_insert_attachment` * * @since 4.7.0 * * @param stdClass $prepared_post An object representing a single post prepared * for inserting or updating the database. * @param WP_REST_Request $request Request object. */ |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | apply_filters | 859 | /** * Filters term data before inserting term via the REST API. * * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug. * * Possible hook names include: * * - `rest_pre_insert_category` * - `rest_pre_insert_post_tag` * * @since 4.7.0 * * @param object $prepared_term Term object. * @param WP_REST_Request $request Request object. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
stdClass | $prepared_post | An object representing a single post prepared |
WP_REST_Request | $request | Request object. |
object | $prepared_term | Term object. |
WP_REST_Request | $request | Request object. |