Check cap before showing comments from private posts in recent comments dashboard widget. fixes #9144.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6c75300614
commit
59c4af548b
|
@ -512,7 +512,7 @@ function wp_dashboard_recent_comments() {
|
|||
foreach ( $possible as $comment ) {
|
||||
if ( count( $comments ) >= $total_items )
|
||||
break;
|
||||
if ( in_array( $comment->comment_approved, $allowed_states ) )
|
||||
if ( in_array( $comment->comment_approved, $allowed_states ) && current_user_can( 'read_post', $comment->comment_post_ID ) )
|
||||
$comments[] = $comment;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue