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_3161', 10, 3 );
function filter_function_name_3161( $response, $comment, $request ){
	// filter...

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

Where the hook is called

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

Where the hook is used (in WP core)

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