Filter hook 'rest_prepare_block_type'

in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php at line 349

Description

Filters a block type returned from the REST API. Allows modification of the block type data right before it is returned.

Occurrences

Filename Line Number
wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php 349

Parameters

Type Name Description
WP_REST_Response $response The response object.
WP_Block_Type $block_type The original block type object.
WP_REST_Request $request Request used to generate the response.

PHP Doc

/**
		 * Filters a block type returned from the REST API.
		 *
		 * Allows modification of the block type data right before it is returned.
		 *
		 * @since 5.5.0
		 *
		 * @param WP_REST_Response $response   The response object.
		 * @param WP_Block_Type    $block_type The original block type object.
		 * @param WP_REST_Request  $request    Request used to generate the response.
		 */