Action hook 'rest_insert_comment'

in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php at line 728

Description

Fires after a comment is created or updated via the REST API.

Occurrences

Filename Line Number
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 728
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 892

Parameters

Type Name Description
WP_Comment $comment Inserted or updated comment object.
WP_REST_Request $request Request object.
bool $creating True when creating a comment, false when updating.

PHP Doc

/**
		 * Fires after a comment is created or updated via the REST API.
		 *
		 * @since 4.7.0
		 *
		 * @param WP_Comment      $comment  Inserted or updated comment object.
		 * @param WP_REST_Request $request  Request object.
		 * @param bool            $creating True when creating a comment, false
		 *                                  when updating.
		 */