Make WordPress Core

Changeset 13800


Ignore:
Timestamp:
03/22/2010 02:01:43 PM (15 years ago)
Author:
nacin
Message:

Check cap before showing comments from private posts in recent comments dashboard widget. fixes #9144.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r13791 r13800  
    513513            if ( count( $comments ) >= $total_items )
    514514                break;
    515             if ( in_array( $comment->comment_approved, $allowed_states ) )
     515            if ( in_array( $comment->comment_approved, $allowed_states ) && current_user_can( 'read_post', $comment->comment_post_ID ) )
    516516                $comments[] = $comment;
    517517        }
Note: See TracChangeset for help on using the changeset viewer.