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



rest_preprocess_comment › WordPress Filter Hooks

Since4.7.0
Deprecatedn/a
apply_filters( 'rest_preprocess_comment', $prepared_comment, $request )
Parameters: (2)
  • (array) $prepared_comment The prepared comment data for `wp_insert_comment`.
    Required: Yes
  • (WP_REST_Request) $request The current request.
    Required: Yes
Defined at:
Codex:

Filters a comment added via the REST API after it is prepared for insertion into the database.

Allows modification of the comment right after it is prepared for the database.





Source

return apply_filters( 'rest_preprocess_comment', $prepared_comment, $request );