WordPress at Your Fingertips
filter is not described

rest_prepare_widget_type filter-hook . WP 5.8.0

Filters the REST API response for a widget type.

Usage

add_filter( 'rest_prepare_widget_type', 'filter_function_name_7705', 10, 3 );
function filter_function_name_7705( $response, $widget_type, $request ){
	// filter...

	return $response;
}
$response(WP_REST_Response)
The response object.
$widget_type(array)
The array of widget data.
$request(WP_REST_Request)
The request object.

Changelog

Since 5.8.0 Introduced.

Where the hook is called

WP_REST_Widget_Types_Controller::prepare_item_for_response()
rest_prepare_widget_type
wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php 321
return apply_filters( 'rest_prepare_widget_type', $response, $widget_type, $request );

Where in WP core the hook is used WordPress

Usage not found.