Opened 7 years ago
Last modified 5 years ago
#41893 new enhancement
Add URL filter in posts list table get_edit_link()
Reported by: | GunGeekATX | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Posts, Post Types | Keywords: | has-patch 2nd-opinion dev-feedback |
Focuses: | administration | Cc: |
Description
In get_edit_link()
in the WP_Posts_List_Table class, the URL to edit.php is hard-coded and is not filterable. I'm currently working on a project that has complex filtering and the client wants to maintain the filters as they click through to different statuses.
Currently, the only way to update just the URL to edit.php is to use the "views_{$this->screen->id}"
filter, use regex to find the URL in the markup, then update the URL in the markup as-needed. The proposed wp_posts_list_table_edit_url
filter would allow filtering of the generated URL separate from the markup.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
Thanks for the ticket and the patch @GunGeekATX. It still seems to apply cleanly onto [47293] so that's great!
I've tried the filter out and it seems alright. Further, I'm looking forward to other opinions from Core folks regarding the opportunity as well as the naming of the filter hook and actual implementation.
Here are some sample parameters coming into the filter function for Posts: