[wp-trac] [WordPress Trac] #61899: Custom query args for `search_box` form in `WP_List_Table`

WordPress Trac noreply at wordpress.org
Tue Aug 20 12:01:55 UTC 2024


#61899: Custom query args for `search_box` form in `WP_List_Table`
----------------------------+-----------------------------
 Reporter:  xipasduarte     |      Owner:  (none)
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61899>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list