Opened 7 years ago
Closed 6 years ago
#38772 closed defect (bug) (fixed)
restrict_manage_posts in wp-media-list-table.php missing 2nd param
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
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.
7 years ago
#2
@
7 years ago
- Type changed from defect (bug) to enhancement
- Version changed from trunk to 3.1
Seems like it makes sense to match wp-admin/includes/class-wp-posts-list-table.php
.
#3
@
7 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 4.8
- Type changed from enhancement to defect (bug)
- Version changed from 3.1 to 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
@
7 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.
Adds second param to action.