WordPress.org

Make WordPress Core

Ticket #14809: 14809.patch

File 14809.patch, 757 bytes (added by jakub.tyrcha, 3 years ago)
  • wp-includes/comment-template.php

     
    887887        } else { 
    888888                $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, wp_specialchars_decode($comment_author,ENT_QUOTES), $comment_author_email)); 
    889889        } 
     890         
     891        $wp_query->comments_by_type = array(); 
    890892 
    891893        // keep $comments for legacy's sake 
    892894        $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID );