On this page
do_action( "rest_after_insert_{$this->taxonomy}", WP_Term $term, WP_REST_Request $request, bool $creating )
Fires after a single term is completely created or updated via the REST API.
Description
The dynamic portion of the hook name, $this->taxonomy, refers to the taxonomy slug.
Possible hook names include:
rest_after_insert_categoryrest_after_insert_post_tag
Parameters
$termWP_Term-
Inserted or updated term object.
$requestWP_REST_Request-
Request object.
$creatingbool-
True when creating a term, false when updating.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php. View all references
do_action( "rest_after_insert_{$this->taxonomy}", $term, $request, true );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Menus_Controller::create_item() wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php | Creates a single term in a taxonomy. |
| WP_REST_Menus_Controller::update_item() wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php | Updates a single term from a taxonomy. |
| WP_REST_Terms_Controller::create_item() wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | Creates a single term in a taxonomy. |
| WP_REST_Terms_Controller::update_item() wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php | Updates a single term from a taxonomy. |
Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_after_insert_this-taxonomy