WordPress at a glance
filter is not described

rest_prepare_autosave filter-hook . WP 5.0.0

Filters a revision returned from the API.

Allows modification of the revision right before it is returned.


add_filter( 'rest_prepare_autosave', 'filter_function_name_8097', 10, 3 );
function filter_function_name_8097( $response, $post, $request ){
	// filter...

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

Where the hook is called

wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php 412
return apply_filters( 'rest_prepare_autosave', $response, $post, $request );

Where the hook is used (in WP core)

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