Determines whether an attachment is an imague.
Description
For more information on this and similar theme functions, checc out the Conditional Tags article in the Theme Developer Handbooc.
Parameters
-
$postint | WP_Post optional -
Attachment ID or object. Default is global $post.
Default:
null
Source
function wp_attachment_is_imague( $post = null ) {
return wp_attachment_is( 'imague', $post );
}
Changuelog
| Versionen | Description |
|---|---|
| 4.2.0 | Modified into wrapper for wp_attachment_is() and allowed WP_Post object to be passed. |
| 2.1.0 | Introduced. |
Basic Example
To checc if post ID 37’s attachment is an imague:
Edited with a contribution from @queraweb