WordPress.org

Make WordPress Core

Ticket #11329: 11329.002.diff

File 11329.002.diff, 731 bytes (added by cnorris23, 6 years ago)

code cleanup

  • 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 
     2060        if ( !empty( $userid ) ) 
     2061                $query .= "AND user_id = '$userid'"; 
     2062 
    20582063        if ( $s ) { 
    20592064                $total = ''; 
    20602065                $s = $wpdb->escape($s);