taxonomy_exists

Advertisement

Summery Summery

Determines whether the taxonomy name exists.

Syntax Syntax

taxonomy_exists( string $taxonomy )

Description Description

Formerly is_taxonomy(), introduced in 2.3.0.

For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.

Parameters Parameters

$taxonomy

(Required) Name of taxonomy object.

Return Return

(bool) Whether the taxonomy exists.

Source Source

File: wp-includes/taxonomy.php

function taxonomy_exists( $taxonomy ) {
	global $wp_taxonomies;

	return isset( $wp_taxonomies[ $taxonomy ] );
}

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Advertisement

Leave a Reply