On this page
do_action( 'comment_post', int $comment_ID, int|string $comment_approved, array $commentdata )
Fires immediately after a comment is inserted into the database.
Parameters
$comment_IDint-
The comment ID.
$comment_approvedint|string-
1 if the comment is approved, 0 if not,
'spam'if spam. $commentdataarray-
Comment data.
Source
File: wp-includes/comment.php. View all references
do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'], $commentdata );
Related
Used By
| Used By | Description |
|---|---|
| wp_new_comment() wp-includes/comment.php | Adds a new comment to the database. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/comment_post