diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 41accc9a46..1b5684b921 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1960,13 +1960,23 @@ function wp_list_comments( $args = array(), $comments = null ) { $current_per_page = get_query_var( 'comments_per_page' ); if ( $r['page'] != $current_cpage || $r['per_page'] != $current_per_page ) { - - $comments = get_comments( array( + $comment_args = array( 'post_id' => get_the_ID(), 'orderby' => 'comment_date_gmt', 'order' => 'ASC', - 'status' => 'all', - ) ); + 'status' => 'approve', + ); + + if ( is_user_logged_in() ) { + $comment_args['include_unapproved'] = get_current_user_id(); + } else { + $commenter = wp_get_current_commenter(); + if ( $commenter['comment_author_email'] ) { + $comment_args['include_unapproved'] = $commenter['comment_author_email']; + } + } + + $comments = get_comments( $comment_args ); if ( 'all' != $r['type'] ) { $comments_by_type = separate_comments( $comments ); diff --git a/wp-includes/version.php b/wp-includes/version.php index dc1314c814..61ac7db5c2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37654'; +$wp_version = '4.6-alpha-37655'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.