Opened 11 years ago
Last modified 6 years ago
#28381 new enhancement
Filter for unattached attachments count
Reported by: | khromov | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Media | Keywords: | has-patch needs-refresh |
Focuses: | Cc: |
Description
There is a filter available for modifying attachment counts (wp_count_attachments) but no filter for modifying unattached attachments count. Therefore I am suggesting this be added via a new filter, wp_count_unattached_attachments, see attached patch.
The attached patch is against trunk.
Attachments (1)
Change History (5)
#3
@
11 years ago
Hey Eric,
I'm making a plugin that will allow non-admins to see their own Media items only.
Here is a working copy of the plugin, (assuming the hook is added as per my patch):
https://gist.github.com/khromov/29411bb7ca3fdd2c3890
The "problem" is the inconsistency that you can filter media attachment counts, but not the unattached media attachment count.
Here's a photo for clarification. The count in the red box cannot be filtered.
https://dl.dropboxusercontent.com/u/2758854/this-one-.png
Hey @khromov, thanks for the bug report and patch!
Can you provide a use case for this?