使用分隔符检索术语父项。
原型
get_term_parents_list( int $term_id, string $taxonomy, string|array $args = array() )
参数
$term_id
(int)
(Required)
术语ID。
$taxonomy
(string)
(Required)
分类名称。
$args
(string|array)
(Optional)
可选参数的数组。 ‘format’(字符串)使用术语名称或slugs进行显示。接受’name’或’slug’。默认’名称’。 ‘separator’(字符串)术语之间的分隔符。默认’/’。 ‘link’(bool)是否格式化为链接。默认为true。 ‘包容性’(bool)包括让父母参与的术语。默认为true。
源文件
路径:“
<?php
...
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_term_parents_list/