wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



taxonomy_exists › WordPress Function

Od3.0.0
Przestarzałyn/a
taxonomy_exists ( $taxonomy )
Parametry:
  • (string) $taxonomy Name of taxonomy object.
    Wymagane: Tak
Powrót:
  • (bool) Whether the taxonomy exists.
Zdefiniowane na:
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.


Źródło

function taxonomy_exists( $taxonomy ) {
	global $wp_taxonomies;

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