wp_attachment_is_image
wp_attachment_is_image ( $post = null )
Parameters:- (int|WP_Post) post Optional. Attachment ID or object. Default is global $post.
Returns:- (bool) Whether the attachment is an image.
Defined at:Change Log: - Introduced in WordPress: 2.1.0
- Deprecated in WordPress: —
Description
Determines whether an attachment is an image.For more information on this and similar theme functions, check out
the {@link Conditional Tags} article in the Theme Developer Handbook.