W3cubDocs

/WordPress

WP_REST_Global_Styles_Controller::check_read_permission( WP_Post $post ): bool

Checks if a global style can be read.

Parameters

$postWP_Postrequired
Post object.

Return

bool Whether the post can be read.

Source

public function check_read_permission( $post ) {
	return current_user_can( 'read_post', $post->ID );
}

Changelog

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