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 5 of 5
function taxonomy_exists( $taxonomy ) {
  global $wp_taxonomies;

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

 View on GitHub View on Trac