首页 WordPress函数大全 get_attachment_taxonomies()

get_attachment_taxonomies()

2020-05-01 / 3661阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_attachment_taxonomies( int|array|object $attachment, string $output = 'names' )

Retrieves taxonomies attached to given the attachment.

描述

参数

$attachment

(int|array|object)
(Required)
Attachment ID, data array, or data object.

$output

(string)
(Optional)
Output type. 'names' to return an array of taxonomy names, or 'objects' to return an array of taxonomy objects. Default is 'names'.

Default value: 'names'

返回

(string[]|WP_Taxonomy[]) List of taxonomies or taxonomy names. Empty array on failure.

大家谈论
    我的见解