From dc2fb99ce878b21bdfcb36e9385403b20c7ac178 Mon Sep 17 00:00:00 2001 From: westi Date: Sun, 10 May 2009 07:11:12 +0000 Subject: [PATCH] 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 --- wp-comments-post.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-comments-post.php b/wp-comments-post.php index 966c5e6d25..c7b5ef33ec 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -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;