Fires immediately after a comment is inserted into the database.
$comment_idint$comment_approvedint|string$commentdataarraywp-includes/comment.php:2430wp_new_comment() * @since 4.5.0 The `$commentdata` parameter was added. * * @param int $comment_id The comment ID. * @param int|string $comment_approved 1 if the comment is approved, 0 if not, 'spam' if spam. * @param array $commentdata Comment data. */ do_action( 'comment_post', $comment_id, $commentdata['comment_approved'], $commentdata ); return $comment_id;} /** * Sends a comment moderation notification to the comment moderator.Introduced in 1.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.