is_taxonomy_hierarchical( string $taxonomy )

Whether the taxonomy object is hierarchical.


Description

Checks to make sure that the taxonomy is an object first. Then Gets the object, and finally returns the hierarchical value in the object.

A false return value might also mean that the taxonomy does not exist.


Parameters

$taxonomy

(string) (Required) Name of taxonomy object.


Return

(bool) Whether the taxonomy is hierarchical.


Source

File: wp-includes/taxonomy.php

function is_taxonomy_hierarchical($taxonomy) {
	if ( ! taxonomy_exists($taxonomy) )
		return false;

	$taxonomy = get_taxonomy($taxonomy);
	return $taxonomy->hierarchical;
}


Changelog

Changelog
Version Description
WP-2.3.0 Introduced.