get_post_taxonomies()

最后更新于:2021-11-26 22:40:33

get_post_taxonomies( int|GC_Post$post)

Retrieve all taxonomy names for the given post.

参数

$post

(int|GC_Post) (Optional) Post ID or GC_Post object. Default is global $post.

响应

(string[]) An array of all taxonomy names for the given post.

源文件

文件: gc-includes/taxonomy.php

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

	return get_object_taxonomies( $post );
}