Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

WordPress hook directory
comment_post

Description

Runs just after a comment is saved in the database. Action function arguments: comment ID, approval status ("spam", or 0/1 for disapproved/approved).

This description was scraped automatically from the WordPress filter reference or action reference. If it looks like this is the wrong description, please tell me so I can fix my code.

WordPress version history for comment_post

This database has information for all major versions from WP 1.2.1 through 5.1.

Version File Line Type
1.2.1 wp-comments-post.php 171 View in context action
1.5.2 wp-includes/functions-post.php 520 View in context action
2.0 wp-includes/comment-functions.php 52 View in context action
2.0.11 wp-includes/comment-functions.php 57 View in context action
2.1 wp-includes/comment.php 397 View in context action
2.2 wp-includes/comment.php 398 View in context action
2.3 wp-includes/comment.php 409 View in context action
2.5 wp-includes/comment.php 686 View in context action
2.6 wp-includes/comment.php 730 View in context action
2.7 wp-includes/comment.php 983 View in context action
2.8 wp-includes/comment.php 997 View in context action
2.9 wp-includes/comment.php 1211 View in context action
3.0 wp-includes/comment.php 1276 View in context action
3.1 wp-includes/comment.php 1338 View in context action
3.2 wp-includes/comment.php 1349 View in context action
3.3 wp-includes/comment.php 1349 View in context action
3.4 wp-includes/comment.php 1363 View in context action
3.5 wp-includes/comment.php 1402 View in context action
3.6 wp-includes/comment.php 1399 View in context action
3.7 wp-includes/comment.php 1414 View in context action
3.8 wp-includes/comment.php 1726 View in context action
3.9 wp-includes/comment.php 1709 View in context action
4.0 wp-includes/comment.php 1811 View in context action
4.1 wp-includes/comment.php 2096 View in context action
4.2 wp-includes/comment.php 2309 View in context action
4.3 wp-includes/comment.php 2406 View in context action
4.4 wp-includes/comment.php 1743 View in context action
4.5 wp-includes/comment.php 1821 View in context action
4.6 wp-includes/comment.php 1824 View in context action
4.7 wp-includes/comment.php 1987 View in context action
4.8 wp-includes/comment.php 1981 View in context action
4.9 wp-includes/comment.php 2015 View in context action
5.0 wp-includes/comment.php 2017 View in context action
5.1 wp-includes/comment.php 2111 View in context action

Related Hooks

We find related hooks using word stems. comment_post has 2 significant word stem(s): comment, post. Note that some of the hooks below may not appear in all versions of WP.