From 6a301a48c4352e6567b193bd820aadf4e6ad2623 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@10684 602fd350-edb4-49c9-b593-d223f7449a82 --- 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.') ); }