#6872 closed defect (bug) (fixed)
List table views can't be filtered
Reported by: | thebrandonallen | Owned by: | imath |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
This ticket technically addresses two separate issues. However, since one exposes the other, I'm wrapping them both into one.
The first issue is that the signups list table doesn't set the screen
parameter in the constructor. This means them when you're on the Pending
(signups) view, any custom views added via the view_(users\users-network)
filter will disappear.
The second issue, is that the Pending
view is added in the get_views()
method, on top of being added via filter. As long as you're on any view other than the Pending
view, the filter kicks in. When on the Pending
view, any other custom views added earlier than the Pending
view will get bumped behind the pending view.
The attached patch fixes both issues. The get_views()
method can actually be removed, but I didn't want to make that decision, so the patch just calls parent::get_views()
.
Attachments (5)
Change History (14)
#2
@
9 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 2.5
Just tested on multisite and on non multisite, works great and i agree it's something we should do!
Thanks a lot @thebrandonallen
#3
@
9 years ago
- Owner set to imath
- Resolution set to fixed
- Status changed from new to closed
In 10547:
#4
@
9 years ago
- Keywords needs-patch added; has-patch has-screenshots commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
This commit has 2 side effects we need to fix:
- As the screen id is now set to the users one, then any plugin adding columns to the users list will also add their column to the signups list.
- It's no more possible to hide columns within the screen options tab.
@thebrandonallen If we don't find a solution, i suggest to revert the commit.
#5
@
9 years ago
- Keywords has-patch reporter-feedback added; needs-patch removed
.03.patch should fix the issue and let plugins safely add their views before or after our "Pending" one.
@thebrandonallen can you confirm ?
#6
@
9 years ago
- Keywords reporter-feedback removed
I can confirm .03.patch works. It's a shame it took that much code get it working. Thanks!
Views displayed as expected