Filters a comment before it is inserted via the REST API.
Allows modification of the comment right before it is inserted via wp_insert_comment() .
Returning a WP_Error value from the filter will short-circuit insertion and allow skipping further processing.
$prepared_commentarray|WP_Error
$requestWP_REST_Request
$prepared_comment = apply_filters( 'rest_pre_insert_comment', $prepared_comment, $request );
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_pre_insert_comment