From 7e349ec5c41291c58a8039085f54f1cb54317cc8 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Mon, 24 Nov 2014 10:50:38 +0000 Subject: [PATCH] Fix the passing of commenter cookie data to the comment API so that we don't try and fetch all unapproved comments for users with no-email address when we only have an author. Fixes #19623 git-svn-id: https://develop.svn.wordpress.org/trunk@30547 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php index 67a2095c20..1377f3cc05 100644 --- a/src/wp-includes/comment-template.php +++ b/src/wp-includes/comment-template.php @@ -1160,7 +1160,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false if ( $user_ID ) { $comment_args['include_unapproved'] = array( $user_ID ); - } else if ( ! empty( $comment_author ) ) { + } else if ( ! empty( $comment_author_email ) ) { $comment_args['include_unapproved'] = array( $comment_author_email ); }