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 Conditional Tags article in the Theme Developer Handbook.
$taxonomystringrequired
function taxonomy_exists( $taxonomy ) {
global $wp_taxonomies;
return is_string( $taxonomy ) && isset( $wp_taxonomies[ $taxonomy ] );
}
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/taxonomy_exists