Summery Summery
Checks if a block can be read.
Syntax Syntax
Parameters Parameters
- $post
-
(Required) Post object that backs the block.
Return Return
(bool) Whether the block can be read.
Source Source
File: wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php
public function check_read_permission( $post ) { // By default the read_post capability is mapped to edit_posts. if ( ! current_user_can( 'read_post', $post->ID ) ) { return false; } return parent::check_read_permission( $post ); }
Advertisement
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |