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.

Usage

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

	return $response;
}
$response(WP_REST_Response)
The response object.
$item(WP_Term)
The original term object.
$request(WP_REST_Request)
Request used to generate the response.

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

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

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

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

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

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