WordPress开发者和主题制作者的搜索引擎



get_post_taxonomies ›

Since2.5.0
已弃用n/a
get_post_taxonomies ( $post = 0 )
参数:
  • (int|WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post.
    Required: No
    默认:
返回:
  • (array) An array of all taxonomy names for the given post.
定义在:
文档:

Retrieve all taxonomies of a post with just the names.



源码

function get_post_taxonomies( $post = 0 ) {
	$post = get_post( $post );

	return get_object_taxonomies( $post );
}