protected function check_read_permission( $status ) {
		if ( true === $status->public ) {
			return true;
		}
		if ( false === $status->internal || 'trash' === $status->name ) {
			$types = get_post_types( array( 'show_in_rest' => true ), 'objects' );
			foreach ( $types as $type ) {
				if ( current_user_can( $type->cap->edit_posts ) ) {
					return true;
				}
			}
		}
		return false;
	}
protected function check_read_permission( $status ) {
		if ( true === $status->public ) {
			return true;
		}
		if ( false === $status->internal || 'trash' === $status->name ) {
			$types = get_post_types( array( 'show_in_rest' => true ), 'objects' );
			foreach ( $types as $type ) {
				if ( current_user_can( $type->cap->edit_posts ) ) {
					return true;
				}
			}
		}
		return false;
	}
protected function check_read_permission ( $ status ) { if ( true === $ status -> public ) { return true ; } if ( false === $ status -> internal || 'trash' === $ status -> name ) { $ types = get_post_types ( array ( 'show_in_rest' => true ) , 'objects' ) ; foreach ( $ types as $ type ) { if ( current_user_can ( $ type -> cap -> edit_posts ) ) { return true ; } } } return false ; }
Check whether a given post status should be visible

@param object $status
@return boolean
Check whether a given post status should be visible