is_taxonomy_hierarchical( string $taxonomy )
Détermine si la taxonomie est hiérarchique.
Paramètre
$taxonomy
(string)requisNom de l'objet de la taxonomie.
Description / Informations supplémentaires
Vérifie d'abord que la taxonomie existe, obtient l'objet de celle-ci puis retourne la valeur du champ 'hierarchical' de l'objet.
Retourne
(bool) True si la taxonomie est hiérarchique.
Déclaration et structure de la fonction is_taxonomy_hierarchical()
is_taxonomy_hierarchical()
est déclarée dans le fichier wp-includes/taxonomy.php
à la ligne 399 :
function is_taxonomy_hierarchical( $taxonomy ) {
if ( ! taxonomy_exists( $taxonomy ) ) {
return false;
}
$taxonomy = get_taxonomy( $taxonomy );
return $taxonomy->hierarchical;
}
Fonctions utilisées par is_taxonomy_hierarchical()
taxonomy_exists()
Détermine si un nom de taxonomie existe.
get_taxonomy()
Retourne l'objet d'une taxonomie en donnant son nom.
Où est utilisée la fonction is_taxonomy_hierarchical()
dans le CMS WordPress
Sources
Codex WordPress : is_taxonomy_hierarchical()
Autres fonctions dans le même fichier : wp-includes/taxonomy.php