WordPress.org

Make WordPress Core

Ticket #9144: 9144.diff

File 9144.diff, 585 bytes (added by nacin, 8 years ago)
  • wp-admin/includes/dashboard.php

     
    486486                foreach ( $possible as $comment ) {
    487487                        if ( count( $comments ) >= 5 )
    488488                                break;
    489                         if ( in_array( $comment->comment_approved, $allowed_states ) )
     489                        if ( in_array( $comment->comment_approved, $allowed_states ) && current_user_can( 'read_post', $comment->comment_post_ID ) )
    490490                                $comments[] = $comment;
     491                               
    491492                }
    492493
    493494                $start = $start + 50;