Core Function
View Source on Trac ↗ get_post_mime_type()
get_post_mime_type( mixed $post = null ) Retrieves the mime type of an attachment based on the ID.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $post Optional. Post ID or post object. Defaults to global $post. Required |
Return Value
((string)
| false) The mime type on success, false on failure.
Function Information
Since Version
2.0.0
Source File
wp-includes/post.php
Advertisement