Opened 13 years ago
Closed 9 years ago
#19609 closed enhancement (fixed)
Show the 'Mine' filter on the manage posts screen for all users
Reported by: | johnbillion | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | needs-screenshots has-patch |
Focuses: | administration | Cc: |
Description
Authors and Contributors get a handy filter on the manage posts screen called 'Mine' which shows just that user's posts. It's also the default view for those user roles.
Editors and Admins don't see this filter at all. It'd be nice if it was available, even if it's not the default view like it is for Authors and Contributors.
If no-one else wants to then I'll look at doing a patch after the holidays.
Attachments (4)
Change History (23)
#2
@
11 years ago
I agree. This is a simple change but really handy when you have a team of editors. Any chance this could be implemented in 3.6?
#4
@
11 years ago
- Component changed from Administration to Posts, Post Types
- Focuses administration added
#5
@
9 years ago
- Milestone changed from Awaiting Review to 4.4
- Owner set to johnbillion
- Status changed from new to assigned
19609.diff refreshes
#7
@
9 years ago
Any benefit in limiting this to when there is more than one user with author+ capabilities? i.e. if there is only one author or above, even with a load of subscribers, having a Mine link showing is completely redundant.
Or perhaps, only when there first post by a second user has been created?
A simpler check may be when the count for Mine matches the count for All. If they are the same, then don't show Mine.
#8
@
9 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
I concur. Only showing the link when the Mine
count doesn't match the All
count makes the most sense.
#12
@
9 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
is_multi_author()
isn't actually appropriate here because it only queries published Posts.
#15
@
9 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The pagination is currently broken on the "Mine" view. We have to set the $total_items
to $this->user_posts_count
, see 19609.3.diff.
#17
@
9 years ago
I switched to a loose type comparison and $_GET['author']
so it handles both users who've manually clicked the 'Mine' tab, and users such as Authors who see the 'Mine' tab by default.
#18
@
9 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Looks like the "All" link doesn't get the .current
CSS class anymore:
probably the conditional in this bit of code should be changed since now $this->user_posts_count
returns a count value for all users not just for authors.
if ( empty( $class ) && ( ( $this->is_base_request() && ! $this->user_posts_count ) || isset( $_REQUEST['all_posts'] ) ) ) { $class = 'current'; }
It sounds like a useful enhancement.
19609.patch is an initial effort. It allows
user_posts_count
to get a value and pushes$post_type_object->cap->edit_others_posts
to be checked a bit later, in order to maintain the "All" filter as the default one for Editors/Admins.Then we should consider, if the "All" filter should be displayed first in the row on the manage posts screen for Editors/Admins.