From 27ff02e402fa0b0d31aa6de01451e132f797a7dd Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 2 Mar 2009 22:42:22 +0000 Subject: [PATCH] Require user to be logged in to comment on private posts. Props tott. see #8997 git-svn-id: http://svn.automattic.com/wordpress/trunk@10684 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-comments-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-comments-post.php b/wp-comments-post.php index 64cc8e3295..8032ed3950 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -52,7 +52,7 @@ if ( $user->ID ) { } } } else { - if ( get_option('comment_registration') ) + if ( get_option('comment_registration') || 'private' == $status->post_status ) wp_die( __('Sorry, you must be logged in to post a comment.') ); }