get_attachment_taxonomies
get_attachment_taxonomies ( $attachment, $output = 'names' )
Parameters:- (int|array|object) attachment Attachment ID, data array, or data object.
- (string) output Output type. 'names' to return an array of taxonomy names, or 'objects' to return an array of taxonomy objects. Default is 'names'.
Returns:- (string[]|WP_Taxonomy[]) List of taxonomies or taxonomy names. Empty array on failure.
Defined at:Change Log: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Retrieves taxonomies attached to given the attachment.