Core Function
View Source on Trac ↗ wp_attachment_is_image()
wp_attachment_is_image( mixed $post = null ) Determines whether an attachment is an image.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $post Optional. Attachment ID or object. Default is global $post. Required |
Return Value
(bool)
Whether the attachment is an image.
Function Information
Since Version
2.1.0
Source File
wp-includes/post.php
Advertisement