函数原型
get_taxonomies( array $args = array(), string $output = ‘names’, string $operator = ‘and’ ): string[]|WP_Taxonomy[]
函数描述
Retrieves a list of registered taxonomy names or objects.
是否弃用
未弃用
函数参数
-
$args
array
Optional - An array of
key => valuearguments to match against the taxonomy objects.
Default:
array() -
$output
string
Optional - The type of output to return in the array. Accepts either taxonomy
'names'or'objects'. Default'names'.Default:
'names' -
$operator
string
Optional - The logical operation to perform. Accepts
'and'or'or'.'or'means only one element from the array needs to match;'and'means all elements must match.
Default'and'.Default:
'and'
函数返回值
string[]|WP_Taxonomy[] An array of taxonomy names or objects.
函数位置
File: wp-includes/taxonomy.php.
函数源码
Array ( [special_taxonomy] => special_taxonomy [custom_taxonomy] => custom_taxonomy )
源码链接
变更日志
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |

