#13235 closed enhancement (duplicate)
Simplify and add filtering to call to display author for media
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
The author displayed on the media page (upload.php) is not filterable in any way currently. This patch adds a filter for the author ('media_author'). Perhaps more filters should be added for other fields, but at the least I would like to add this filter.
Attachments (6)
Change History (22)
#2
@
15 years ago
Perhaps I'm missing something, but which? The only other one I see in upload.php or edit-attachment-rows.php is 'media_row_actions', but that's specifically for the actions available to something in the media library I think.
#3
@
15 years ago
the_author and get_the_author have filters.
Doesn't look like the direct setup_userdata call can be changed easily. That said, if you want to filter the entire column, why not remove the column and add your own?
Leaving in 3.1 for sure as that's the earliest we're going to touch media/upload. When we do, we're likely going to break a lot, and we don't want more filters in place we need to at least consider back compat for.
#4
@
15 years ago
Well, one could filter 'the_author' and/or 'get_the_author_display_name', which actually does seem like a better idea than adding this filter. However, then the code in upload.php should probably be changed to use the_author or run through the filter instead of echoing $author->display_name. Thoughts?
#5
@
15 years ago
- Summary changed from Add filter for author on media page to Simplify call to display author for unattached media
Thanks for the feedback, nacin. I was making this much harder than I realized. Now I would just propose simplifying the way the author is called for unattached media.
#6
@
15 years ago
- Summary changed from Simplify call to display author for unattached media to Simplify and add filtering to call to display author for media
#8
@
14 years ago
- Keywords needs-refresh added; has-patch removed
- Milestone changed from Awaiting Triage to Future Release
Future release for now, as these need refresh against trunk due to the list tables.
#9
@
14 years ago
- Keywords has-patch added; needs-refresh removed
Added a refreshed patch. Should be good to go for 3.1.
#13
@
14 years ago
Just tested this on tip of trunk and the latest patch (13235.6.diff) still works great. However, I realized that it no longer achieves the purpose I was hoping. While the author text displayed can be filtered using the standard 'the_author' filter, the href added cannot be filtered as desired. Any ideas for how this could be achieved properly? Would adding a separate filter like originally proposed (first patch uploaded) be that bad an idea?
Would like to get this in before 3.2 freeze so I can stop thinking about this year-old ticket.
#14
@
11 years ago
- Keywords has-patch commit 3.2-early removed
- Resolution set to worksforme
- Status changed from new to closed
This was fixed in r23430
It looks like there are already filters that can be leveraged for this.