WordPress.org

Make WordPress Core

Ticket #10463: 10463.001.diff

File 10463.001.diff, 2.0 KB (added by aaroncampbell, 6 years ago)
  • trunk/wp-admin/includes/template.php

     
    19831983 * 
    19841984 * @since unknown 
    19851985 * 
    1986  * @param unknown_type $status 
    1987  * @param unknown_type $s 
    1988  * @param unknown_type $start 
    1989  * @param unknown_type $num 
    1990  * @param unknown_type $post 
    1991  * @param unknown_type $type 
    1992  * @return unknown 
     1986 * @param string $status Comment status (approved, spam, deleted, etc) 
     1987 * @param string $s Term to search for 
     1988 * @param int $start Offset to start at for pagination 
     1989 * @param int $num Maximum number of comments to return 
     1990 * @param int $post Post ID or 0 to return all comments 
     1991 * @param string $type Comment type (comment, trackback, pingback, etc) 
     1992 * @return array [0] contains the comments and [1] contains the total number of comments that match (ignoring $start and $num) 
    19931993 */ 
    19941994function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) { 
    19951995        global $wpdb; 
     
    20292029 
    20302030        if ( 'comment' == $type ) 
    20312031                $typesql = "AND comment_type = ''"; 
    2032         elseif ( 'pingback' == $type ) 
    2033                 $typesql = "AND comment_type = 'pingback'"; 
    2034         elseif ( 'trackback' == $type ) 
    2035                 $typesql = "AND comment_type = 'trackback'"; 
    20362032        elseif ( 'pings' == $type ) 
    20372033                $typesql = "AND ( comment_type = 'pingback' OR comment_type = 'trackback' )"; 
     2034        elseif ( !empty($type) ) 
     2035                $typesql = $wpdb->prepare("AND comment_type = %s", $type); 
    20382036        else 
    20392037                $typesql = ''; 
    20402038 
     
    21242122                                echo '<div id="submitted-on">'; 
    21252123                                printf(__('Submitted on <a href="%1$s">%2$s at %3$s</a>'), get_comment_link($comment->comment_ID), get_comment_date(__('Y/m/d')), get_comment_date(__('g:ia'))); 
    21262124                                echo '</div>'; 
    2127                                 comment_text();  
     2125                                comment_text(); 
    21282126                                if ( $user_can ) { ?> 
    21292127                                <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 
    21302128                                <textarea class="comment" rows="1" cols="1"><?php echo htmlspecialchars($comment->comment_content, ENT_QUOTES); ?></textarea>