WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about rest_insert_comment

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php do_action 727 /**
* 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.
*/
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php do_action 891 /**
* Updates a comment.
*
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
*/

Hook Parameters

Parameter 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
WP_Comment $comment Inserted or updated comment object.
WP_REST_Request $request Request object.
bool $creating True when creating a comment, false