WordPress at a glance
filter is not described

rest_prepare_(taxonomy) filter-hook . WP 4.7.0

Filters a term item returned from the API.

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

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


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

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

Список изменений

С версии 4.7.0 Введена.

Где вызывается хук

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

Где используется хук в ядре WP

Использование не найдено.