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 (53)
- 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
comment:14 in reply to: ↑ 13 ; follow-up: ↓ 18 kevinB — 3 years ago
comment:18 in reply to: ↑ 14 kevinB — 3 years ago
comment:23 in reply to: ↑ 21 kevinB — 3 years ago
comment:32 scribu — 3 years ago
- Summary changed from context arg for WP_Query filter application to add hooks for Media Library attachment counts
comment:33 follow-up: ↓ 37 wonderboymusic — 9 months ago
- Milestone changed from Awaiting Review to 3.7
comment:40 wonderboymusic — 3 months ago
- Keywords needs-unit-tests added
- Milestone changed from Awaiting Review to 3.9
Note: See TracTickets for help on using tickets.