WordPress at Your Fingertips
filter is not described

rest_prepare_(taxonomy) filter-hook . WP 4.7.0

Filters the term data for a REST API response.

The dynamic portion of the hook name, $this->taxonomy, refers to the taxonomy slug.

Possible filter names include:

  • rest_prepare_category
  • rest_prepare_post_tag

Allows modification of the term data right before it is returned.


add_filter( 'rest_prepare_(taxonomy)', 'filter_function_name_9250', 10, 3 );
function filter_function_name_9250( $response, $item, $request ){
	// filter...

	return $response;
The response object.
The original term object.
Request used to generate the response.


Since 4.7.0 Introduced.

Where the hook is called

wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php 848
return apply_filters( "rest_prepare_{$this->taxonomy}", $response, $item, $request );

Where in WP core the hook is used WordPress

Usage not found.