wp_count_attachments filter-hook . WP 3.7.0
Modify returned attachment counts by mime type.
Usage
add_filter( 'wp_count_attachments', 'filter_function_name_5391', 10, 2 ); function filter_function_name_5391( $counts, $mime_type ){ // filter... return $counts; }
- $counts(object)
- An object containing the attachment counts by mime type.
- $mime_type(string)
- The mime type pattern used to filter the attachments counted.
Changelog
Since 3.7.0 | Introduced. |
Where the hook is called
wp_count_attachments
wp-includes/post.php 2751
return apply_filters( 'wp_count_attachments', (object) $counts, $mime_type );