- Timestamp:
- 10/12/2023 02:21:47 PM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-admin/includes/class-wp-list-table.php
r30679 r56850 574 574 $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) ); 575 575 576 $post_object = get_post( $post_id ); 577 $edit_post_cap = $post_object ? 'edit_post' : 'edit_posts'; 578 if ( 579 current_user_can( $edit_post_cap, $post_id ) || 580 ( 581 empty( $post_object->post_password ) && 582 current_user_can( 'read_post', $post_id ) 583 ) 584 ) { 585 // The user has access to the post and thus can see comments 586 } else { 587 return false; 588 } 589 576 590 if ( $pending_comments ) 577 591 echo '<strong>';
Note: See TracChangeset
for help on using the changeset viewer.