WordPress.org

Make WordPress Core

Ticket #11329: 11329.001.diff

File 11329.001.diff, 724 bytes (added by cnorris23, 4 years ago)
  • wp-admin/includes/template.php

     
    20122012        $post = (int) $post; 
    20132013        $count = wp_count_comments(); 
    20142014        $index = ''; 
     2015        $userid = apply_filters( 'get_comment_list_by_user', '' ); 
    20152016 
    20162017        if ( 'moderated' == $status ) { 
    20172018                $approved = "c.comment_approved = '0'"; 
     
    20552056                $total = ''; 
    20562057 
    20572058        $query = "FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' "; 
     2059        if ( !empty($userid) ) 
     2060                $query .= "AND user_id = '$userid'"; 
    20582061        if ( $s ) { 
    20592062                $total = ''; 
    20602063                $s = $wpdb->escape($s);