Uma área de pesquisa sobre o WordPress para devs e autores do tema



taxonomy_exists ›

Desde3.0.0
Obsoleton/a
taxonomy_exists ( $taxonomy )
Parâmetros:
  • (string) $taxonomy Name of taxonomy object.
    Required: Yes
Retorna:
  • (bool) Whether the taxonomy exists.
Definido em:
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.



Fonte

function taxonomy_exists( $taxonomy ) {
	global $wp_taxonomies;

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