函数原型
get_post_taxonomies( int|WP_Post $post ): string[]
函数描述
Retrieves all taxonomy names for the given post.
是否弃用
未弃用
函数参数
-
$post
int|WP_Post
Optional - Post ID or WP_Post object. Default is global $post.
函数返回值
string[] An array of all taxonomy names for the given post.
函数位置
File: wp-includes/taxonomy.php.
函数源码
function get_post_taxonomies( $post = 0 ) {
$post = get_post( $post );
return get_object_taxonomies( $post );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |

