wpseek.com
A WordPress-centric search engine for devs and theme authors



taxonomy_exists › WordPress Function

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 Conditional Tags} article in the Theme Developer Handbook.


Source

function taxonomy_exists( $taxonomy ) {
	global $wp_taxonomies;

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