Core Function
View Source on Trac ↗ wp_count_attachments()
wp_count_attachments( mixed $mime_type = '' ) Counts number of attachments for the mime type(s).
Parameters 1 required
| Name / Type | Description |
|---|---|
| mixed | (string | string[]) $mime_type Optional. Array or comma-separated list of MIME patterns. Default empty. Required |
Return Value
(stdClass)
An object containing the attachment counts by mime type.
Function Information
Since Version
2.5.0
Source File
wp-includes/post.php
Advertisement