通过mime类型修改返回的附件计数。
原型
apply_filters( 'wp_count_attachments', object $counts, string $mime_type )
参数
$counts
(object)
包含附件的对象按mime类型计数。
$mime_type
(string)
用于过滤附件计数的mime类型模式。
源文件
路径:wp-includes/post.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/wp_count_attachments/