Filters the term data for a REST API response.
The dynamic portion of the hook name, $this->taxonomy, refers to the taxonomy slug.
Possible hook names include:
rest_prepare_categoryrest_prepare_post_tagAllows modification of the term data right before it is returned.
$responseWP_REST_Response
$itemWP_Term
$requestWP_REST_Request
return apply_filters( "rest_prepare_{$this->taxonomy}", $response, $item, $request );
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_prepare_this-taxonomy