is_taxonomy_hierarchical( string $taxonomy )
Détermine si la taxonomie est hiérarchique.
Description
Vérifie d'abord que la taxonomie existe, obtient l'objet de celle-ci puis retourne la valeur du champ 'hierarchical' de l'objet.
Paramètre
$taxonomy
(string) (Requis) Nom de l'objet de la taxonomie.
Retourne
(bool) True si la taxonomie est hiérarchique.
Structure de la fonction is_taxonomy_hierarchical()
Définie dans le fichier wp-includes/taxonomy.php à la ligne 310 :
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ù trouver 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