Changeset 57123 for trunk/src/wp-admin/includes/dashboard.php
- Timestamp:
- 11/17/2023 05:09:09 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/dashboard.php
r56836 r57123 1089 1089 1090 1090 foreach ( $possible as $comment ) { 1091 if ( ! current_user_can( 'read_post', $comment->comment_post_ID ) ) { 1091 $comment_post = get_post( $comment->comment_post_ID ); 1092 1093 if ( ! current_user_can( 'edit_post', $comment->comment_post_ID ) 1094 && ( ! empty( $comment_post->post_password ) 1095 || ! current_user_can( 'read_post', $comment->comment_post_ID ) ) 1096 ) { 1097 // The user has no access to the post and thus cannot see the comments. 1092 1098 continue; 1093 1099 } … … 1110 1116 echo '<ul id="the-comment-list" data-wp-lists="list:comment">'; 1111 1117 foreach ( $comments as $comment ) { 1112 $comment_post = get_post( $comment->comment_post_ID ); 1113 if ( 1114 current_user_can( 'edit_post', $comment->comment_post_ID ) || 1115 ( 1116 empty( $comment_post->post_password ) && 1117 current_user_can( 'read_post', $comment->comment_post_ID ) 1118 ) 1119 ) { 1120 _wp_dashboard_recent_comments_row( $comment ); 1121 } 1118 _wp_dashboard_recent_comments_row( $comment ); 1122 1119 } 1123 1120 echo '</ul>';
Note: See TracChangeset
for help on using the changeset viewer.