WP_REST_Global_Styles_Controller::check_update_permission()protectedWP 5.9.0

Checks if a global style can be edited.

{} It's a method of the class: WP_REST_Global_Styles_Controller{}

No Hooks.

Return

true|false. Whether the post can be edited.

Usage

// protected - for code of main (parent) or child class
$result = $this->check_update_permission( $post );
$post(WP_Post) (required)
Post object.

Changelog

Since 5.9.0 Introduced.

Code of WP_REST_Global_Styles_Controller::check_update_permission() WP 6.0

protected function check_update_permission( $post ) {
	return current_user_can( 'edit_post', $post->ID );
}