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:
  • 4: .

Description

Retrieves taxonomies attached to given the attachment.

Related Functions

get_the_taxonomies, get_attachment_icon, get_attachment_icon_src, get_object_taxonomies, get_attachment_link

Top Google Results

User discussions

wpseek mobile