comment_post

Advertisement

Summery Summery

Fires immediately after a comment is inserted into the database.

Syntax Syntax

do_action( 'comment_post', int $comment_ID, int|string $comment_approved, array $commentdata )

Parameters Parameters

$comment_ID

(int) The comment ID.

$comment_approved

(int|string) 1 if the comment is approved, 0 if not, 'spam' if spam.

$commentdata

(array) Comment data.

Source Source

File: wp-includes/comment.php

Advertisement

Changelog Changelog

Changelog
Version Description
4.5.0 The $commentdata parameter was added.
1.2.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.