WordPress at a glance

taxonomy_exists() WP 1.0

Checks that the taxonomy name exists.

Formerly is_taxonomy(), introduced in 2.3.0.

  • Global. Array. $wp_taxonomies The registered taxonomies.
Is the basis for: is_taxonomy_hierarchical()
✈ 1 time = 0.00001s = speed of light | 50000 times = 0.02s = speed of light PHP 7.0.14, WP 4.7

No Hooks.

Return

true/false. Whether the taxonomy exists.

Usage

taxonomy_exists( $taxonomy );
$taxonomy(string) (required)
Name of taxonomy object.

Code of taxonomy_exists: wp-includes/taxonomy.php VER 4.9.8

<?php
function taxonomy_exists( $taxonomy ) {
	global $wp_taxonomies;

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

Related Functions

From tag: Conditional tags (all)

More from category: Any taxonomy

No comments
    Hello, !     Log In . Register