A WordPress-centric search engine for devs and theme authors



taxonomy_exists ›

Since3.0.0
Deprecatedn/a
taxonomy_exists ( $taxonomy )
Parameters:
  • (string) $taxonomy Name of taxonomy object.
    Required: Yes
Returns:
  • (bool) Whether the taxonomy exists.
Defined at:
Codex:

Determines whether the taxonomy name exists.

Formerly is_taxonomy(), introduced in 2.3.0.

For more information on this and similar theme functions, check out the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.



Source

function taxonomy_exists( $taxonomy ) {
	global $wp_taxonomies;

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