protected function check_is_post_type_allowed( $post_type ) {
		if ( ! is_object( $post_type ) ) {
			$post_type = get_post_type_object( $post_type );
		}

		if ( ! empty( $post_type ) && ! empty( $post_type->show_in_rest ) ) {
			return true;
		}

		return false;
	}
protected function check_is_post_type_allowed( $post_type ) {
		if ( ! is_object( $post_type ) ) {
			$post_type = get_post_type_object( $post_type );
		}

		if ( ! empty( $post_type ) && ! empty( $post_type->show_in_rest ) ) {
			return true;
		}

		return false;
	}
protected function check_is_post_type_allowed ( $ post_type ) { if ( ! is_object ( $ post_type ) ) { $ post_type = get_post_type_object ( $ post_type ) ; } if ( ! empty ( $ post_type ) && ! empty ( $ post_type -> show_in_rest ) ) { return true ; } return false ; }
Check if a given post type should be viewed or managed.

@param object|string $post_type Post type name or object.
@return boolean Is post type allowed?
Check if a given post type should be viewed or managed .