get_object_taxonomies

本主题由 神墓 创建于 2009-10-29 23:39:47

get_object_taxonomies (line 42)
Return all of the taxonomy names that are of $object_type.

It appears that this function can be used to find all of the names inside of $wp_taxonomies global variable.

<?php $taxonomies = get_object_taxonomies('post'); ?>

Should result in

Array('category', 'post_tag')


return: The names of all taxonomy of $object_type.
since: 2.3.0
usedby: get_post_taxonomies()
uses: $wp_taxonomies


array get_object_taxonomies (array|string|object $object)
array|string|object $object: Name of the type of taxonomy object, or an object (row from posts)


http://phpdoc.ftwr.co.uk/wordpress/WordPress/Taxonomy/_wp-includes---taxonomy.php.html

放心注册,GeeKaa不会虚耗你半点时间,你只会发现更多乐趣。 立即注册