- Timestamp:
- 05/23/2020 03:22:53 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r47265 r47850 1480 1480 1481 1481 // Is the post readable? 1482 if ( 'publish' === $post->post_status || current_user_can( $post_type->cap->read_post, $post->ID ) ) {1482 if ( 'publish' === $post->post_status || current_user_can( 'read_post', $post->ID ) ) { 1483 1483 return true; 1484 1484 } … … 1523 1523 } 1524 1524 1525 return current_user_can( $post_type->cap->edit_post, $post->ID );1525 return current_user_can( 'edit_post', $post->ID ); 1526 1526 } 1527 1527 … … 1559 1559 } 1560 1560 1561 return current_user_can( $post_type->cap->delete_post, $post->ID );1561 return current_user_can( 'delete_post', $post->ID ); 1562 1562 } 1563 1563
Note: See TracChangeset
for help on using the changeset viewer.