Check cap before showing comments from private posts in recent comments dashboard widget. fixes #9144.
git-svn-id: https://develop.svn.wordpress.org/trunk@13800 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2e11ca383a
commit
476fcfe595
|
@ -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