- Timestamp:
- 10/12/2023 03:15:04 PM (15 months ago)
- Location:
- branches/5.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.7
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/5.7/src/wp-admin/includes/class-wp-comments-list-table.php
r49193 r56886 622 622 } 623 623 $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); 624 625 $edit_post_cap = $post ? 'edit_post' : 'edit_posts'; 626 if ( 627 current_user_can( $edit_post_cap, $comment->comment_post_ID ) || 628 ( 629 empty( $post->post_password ) && 630 current_user_can( 'read_post', $comment->comment_post_ID ) 631 ) 632 ) { 633 // The user has access to the post 634 } else { 635 return false; 636 } 624 637 625 638 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
Note: See TracChangeset
for help on using the changeset viewer.