Opened 2 years ago
Last modified 2 years ago
#61899 new enhancement
Custom query args for `search_box` form in `WP_List_Table`
| Reported by: | xipasduarte | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | administration |
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.
2 years ago
#1
- Keywords has-patch added
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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