add hooks for Media Library attachment counts
|Reported by:||kevinB||Owned by:|
The Media Library attachments listing and edit links can be filtered via existing WP_Query and has_cap hooks. However, corresponding attachment counts are not cleanly filterable.
The submitted ticket adds the following filters:
- function wp_count_attachments() - result filter 'count_attachments'
- WP_Media_List_Table::get_views() - query filter 'attachment_orphans_query'
- function update_gallery_tab() - query filter 'gallery_attachment_count_query'
Change History (37)
- Cc kevin@… added
- Component changed from Media to Query
- Summary changed from add hooks for Media Library attachment counts to context arg for WP_Query filter application