get_attached_media


get_attached_media ( $type, $post = 0 )

Parameters:
  • (string) type Mime type.
  • (int|WP_Post) post Optional. Post ID or WP_Post object. Default is global $post.
Returns:
  • (WP_Post[]) Array of media attached to the given post.
Defined at:

Description

Retrieves media attached to the passed post.

Related Functions

get_attached_file, get_attachment_icon, get_attachment_link, get_theme_data, wp_get_attachment_image

Top Google Results

User discussions

wpseek mobile