X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/3f5685912e89eb3b0534acd85aa0946b1ca2bbe3..refs/tags/wordpress-2.9.2-scripts:/wp-comments-post.php diff --git a/wp-comments-post.php b/wp-comments-post.php index 923b03b9..e60d159d 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -27,12 +27,15 @@ if ( empty($status->comment_status) ) { } elseif ( !comments_open($comment_post_ID) ) { do_action('comment_closed', $comment_post_ID); wp_die( __('Sorry, comments are closed for this item.') ); -} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) { +} elseif ( in_array($status->post_status, array('draft', 'future', 'pending') ) ) { do_action('comment_on_draft', $comment_post_ID); exit; } elseif ( 'trash' == $status->post_status ) { do_action('comment_on_trash', $comment_post_ID); exit; +} elseif ( post_password_required($comment_post_ID) ) { + do_action('comment_on_password_protected', $comment_post_ID); + exit; } else { do_action('pre_comment_on_post', $comment_post_ID); }