- Timestamp:
- 05/23/2020 03:22:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php
r46823 r47850 29 29 */ 30 30 public function check_read_permission( $post ) { 31 // Ensure that the user is logged in and has the read_blocks capability. 32 $post_type = get_post_type_object( $post->post_type ); 33 if ( ! current_user_can( $post_type->cap->read_post, $post->ID ) ) { 31 // By default the read_post capability is mapped to edit_posts. 32 if ( ! current_user_can( 'read_post', $post->ID ) ) { 34 33 return false; 35 34 }
Note: See TracChangeset
for help on using the changeset viewer.