wp_count_attachments WordPress Filter Hook
The wp_count_attachments hook is used to return the number of attachments for a given post.
apply_filters( 'wp_count_attachments', stdClass $counts , string|string[] $mime_type ) #
Modify returned attachment counts by mime type.
Parameters
- $counts
(stdClass)An object containing the attachment counts by mime type.
- $mime_type
(string|string[])Array or comma-separated list of MIME patterns.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |