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.
$prepared_commentarray
wp_insert_comment.$requestWP_REST_Request
return apply_filters( 'rest_preprocess_comment', $prepared_comment, $request );
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_preprocess_comment