is_taxonomy_hierarchical()
最后更新于:2021-11-27 11:40:24
is_taxonomy_hierarchical( string$taxonomy)Determines whether the taxonomy object is hierarchical.
参数
- $taxonomy
-
(string) (Required) Name of taxonomy object.
响应
(bool) Whether the taxonomy is hierarchical.
源文件
文件: gc-includes/taxonomy.php
function is_taxonomy_hierarchical( $taxonomy ) {
if ( ! taxonomy_exists( $taxonomy ) ) {
return false;
}
$taxonomy = get_taxonomy( $taxonomy );
return $taxonomy->hierarchical;
}