WordPress at Your Fingertips
filter is not described

rest_prepare_sidebar filter-hook . WP 5.8.0

Filters the REST API response for a sidebar.

Usage

add_filter( 'rest_prepare_sidebar', 'filter_function_name_9891', 10, 3 );
function filter_function_name_9891( $response, $raw_sidebar, $request ){
	// filter...

	return $response;
}
$response(WP_REST_Response)
The response object.
$raw_sidebar(array)
The raw sidebar data.
$request(WP_REST_Request)
The request object.

Changelog

Since 5.8.0 Introduced.

Where the hook is called

WP_REST_Sidebars_Controller::prepare_item_for_response()
rest_prepare_sidebar
wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php 337
return apply_filters( 'rest_prepare_sidebar', $response, $raw_sidebar, $request );

Where in WP core the hook is used WordPress

Usage not found.