WordPress.org

Make WordPress Core

Ticket #10615: get_comments.diff

File get_comments.diff, 482 bytes (added by jshreve, 8 years ago)

only show approved comments

  • default-widgets.php

     
    644644                else if ( $number < 1 )
    645645                        $number = 1;
    646646
    647                 $comments = get_comments(array('number' => $number));
     647                $comments = get_comments(array('number' => $number, 'status' => "approve"));
    648648                $output .= $before_widget;
    649649                if ( $title )
    650650                        $output .= $before_title . $title . $after_title;