Opened 10 years ago
Closed 10 years ago
#38772 closed defect (bug) (fixed)
restrict_manage_posts in wp-media-list-table.php missing 2nd param
| Reported by: | wpsmith | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.8 |
| Component: | Administration | Version: | 4.6 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
restrict_manage_posts in wp-media-list-table.php missing 2nd param that is available and present within wp-admin/includes/class-wp-posts-list-table.php
Attachments (2)
Change History (9)
This ticket was mentioned in Slack in #core by helen. View the logs.
10 years ago
#2
@
10 years ago
- Type defect (bug) → enhancement
- Version trunk → 3.1
Seems like it makes sense to match wp-admin/includes/class-wp-posts-list-table.php.
#3
@
10 years ago
- Keywords has-patch added
- Milestone Awaiting Review → 4.8
- Type enhancement → defect (bug)
- Version 3.1 → 4.6
The $which parameter was added to the restrict_manage_posts action in 37422, so I assume the filter occurrence in the media list table was overlooked. The existing patch looks good to fix that.
Regarding the ticket type, I agree with @wpsmith that this is a bug, since it should be expected that a hook has parameter parity wherever it is executed. Since it's not a bug against trunk, let's move it to 4.8.
#4
@
10 years ago
Having a second look, it might not be as simple: The media list table uses the value "bar" for its $which usage while regular post list tables use "top" or "bottom". I think the patch should also address this in the docs for the $which parameter in the post list table class:
The location of the extra table nav markup: 'top' or 'bottom' for regular post types, or 'bar' for attachments.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Adds second param to action.