当前邮政注册分类一览表

时间:2013-02-04 作者:Digerkam

我正在尝试获取当前帖子的已注册分类列表,我的意思是:

register_taxonomy(\'color\',array(\'thing\'),$args) ;
register_taxonomy(\'shape\',array(\'thing\'),$args) ;
register_taxonomy(\'material\',array(\'thing\'),$args) ;
// etc..
那么,我如何获得注册到“thing”posttype的分类法列表呢?必须类似于:

$taxonomies = get_registred_taxonomies_of(\'thing\') ;
print_r($taxonomies) // Show "color,shape,material"...
有什么想法吗?非常感谢。

1 个回复
最合适的回答,由SO网友:Bainternet 整理而成

您正在寻找get_object_taxonomies 例如:

$taxonomies = get_object_taxonomies(\'thing\') ;
print_r($taxonomies) // Show "color,shape,material"..

结束

相关推荐