Opened 6 weeks ago
Last modified 6 weeks ago
#61899 new enhancement
Custom query args for `search_box` form in `WP_List_Table`
Reported by: | xipasduarte | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
There is no way to preserve a custom query argument in the search forms built by the WP_List_Table
class other than replacing the class that is used through the filter wp_list_table_class_name
.
Replacing the class is effective and provides a lot of customization, when needed, but it's an overkill when we want to add a query argument that has no visible field, like the ones already supported. We'd need to create a custom class for every existing class extension of WP_List_Table
, which would be very hard to maintain.
This proposal is for a new filter (search_box_custom_args
) that will allow just that. Add a custom query argument as a hidden input to the form, when present.
Attachments (1)
Change History (2)
This ticket was mentioned in PR #7216 on WordPress/wordpress-develop by @xipasduarte.
6 weeks ago
#1
- Keywords has-patch added
Provide a filter to add custom query arguments as hidden fields on search forms in the admin interface listings.
Trac ticket: core.trac.wordpress.org/ticket/61899