WordPress at a glance
filter is not described

rest_prepare_comment filter-hook . WP 4.7.0

Filters a comment returned from the API.

Allows modification of the comment right before it is returned.

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

add_filter( 'rest_prepare_comment', 'filter_function_name_2170', 10, 3 );
function filter_function_name_2170( $response, $comment, $request ){
	// filter...

	return $response;
}
$response(WP_REST_Response)
The response object.
$comment(WP_Comment)
The original comment object.
$request(WP_REST_Request)
Request used to generate the response.

Changelog

Since 4.7.0 Introduced.

Where the hook is called

WP_REST_Comments_Controller::prepare_item_for_response()
rest_prepare_comment
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 1133
return apply_filters( 'rest_prepare_comment', $response, $comment, $request );

Where in WP core the hook is used WordPress

Usage not found.