Checks if a global style can be read.
$postWP_Postrequired
public function check_read_permission( $post ) {
return current_user_can( 'read_post', $post->ID );
}
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_global_styles_controller/check_read_permission