Add 'pre_comment_on_post' action to allow early denial by spam plugin. Fixes #8343.

git-svn-id: http://svn.automattic.com/wordpress/trunk@11248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-05-10 07:11:12 +00:00
parent aea091d87d
commit dc2fb99ce8

View File

@ -30,6 +30,8 @@ if ( empty($status->comment_status) ) {
} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) {
do_action('comment_on_draft', $comment_post_ID);
exit;
} else {
do_action('pre_comment_on_post', $comment_post_ID);
}
$comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null;