public function get_item_permissions_check( $request ) {
		$status = get_post_status_object( $request['status'] );
		if ( empty( $status ) ) {
			return new WP_Error( 'rest_status_invalid', __( 'Invalid resource.' ), array( 'status' => 404 ) );
		}
		$check = $this->check_read_permission( $status );
		if ( ! $check ) {
			return new WP_Error( 'rest_cannot_read_status', __( 'Cannot view resource.' ), array( 'status' => rest_authorization_required_code() ) );
		}
		return true;
	}
public function get_item_permissions_check( $request ) {
		$status = get_post_status_object( $request['status'] );
		if ( empty( $status ) ) {
			return new WP_Error( 'rest_status_invalid', __( 'Invalid resource.' ), array( 'status' => 404 ) );
		}
		$check = $this->check_read_permission( $status );
		if ( ! $check ) {
			return new WP_Error( 'rest_cannot_read_status', __( 'Cannot view resource.' ), array( 'status' => rest_authorization_required_code() ) );
		}
		return true;
	}
public function get_item_permissions_check ( $ request ) { $ status = get_post_status_object ( $ request [ 'status' ] ) ; if ( empty ( $ status ) ) { return new WP_Error ( 'rest_status_invalid' , __ ( 'Invalid resource.' ) , array ( 'status' => 404 ) ) ; } $ check = $ this -> check_read_permission ( $ status ) ; if ( ! $ check ) { return new WP_Error ( 'rest_cannot_read_status' , __ ( 'Cannot view resource.' ) , array ( 'status' => rest_authorization_required_code ( ) ) ) ; } return true ; }
Check if a given request has access to read a post status.

@param  WP_REST_Request $request Full details about the request.
@return WP_Error|boolean
Check if a given request has access to read a post status .