wpseek.com
A WordPress-centric search engine for devs and theme authors



rest_prepare_comment › WordPress Filter Hooks

Since4.7.0
Deprecatedn/a
apply_filters( 'rest_prepare_comment', $response, $comment, $request )
Parameters: (3)
  • (WP_REST_Response) $response The response object.
    Required: Yes
  • (WP_Comment) $comment The original comment object.
    Required: Yes
  • (WP_REST_Request) $request Request used to generate the response.
    Required: Yes
Defined at:
Codex:

Filters a comment returned from the REST API.

Allows modification of the comment right before it is returned.





Source

return apply_filters( 'rest_prepare_comment', $response, $comment, $request );