WordPress at a glance
filter is not described

rest_prepare_block_type filter-hook . WP 5.5.0

Filters a block type returned from the REST API.

Allows modification of the block type data right before it is returned.


add_filter( 'rest_prepare_block_type', 'filter_function_name_162', 10, 3 );
function filter_function_name_162( $response, $block_type, $request ){
	// filter...

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

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

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

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

wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php 316
return apply_filters( 'rest_prepare_block_type', $response, $block_type, $request );

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

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