taxonomy_exists() – Determines whether the taxonomy name exists.
You appear to be a bot. Output may be restricted
Description
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.
Usage
$bool = taxonomy_exists( $taxonomy );
Parameters
- $taxonomy
- ( string ) required – Name of taxonomy object.
Returns
bool Whether the taxonomy exists.
Source
File name: wordpress/wp-includes/taxonomy.php
Lines:
1 to 6 of 6
function taxonomy_exists( $taxonomy ) { global $wp_taxonomies; return is_string( $taxonomy ) && isset( $wp_taxonomies[ $taxonomy ] ); }