List Tables: Prevent Filter button submission and show admin notice when no filters are selected - #12754
List Tables: Prevent Filter button submission and show admin notice when no filters are selected#12754himanshupathak95 wants to merge 3 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
…list table filters
…ids filter documentation
8de0df7 to
662e20f
Compare
Trac ticket: https://core.trac.wordpress.org/ticket/31634
Adds client-side validation to the Filter button in WP_List_Table admin screens (Posts, Comments, Media, Links, Sites). When the Filter button is clicked with no meaningful filter criteria selected, the form submission is intercepted. A dismissible admin error notice reading "Please select a filter to apply." is injected at the top of the page, and wp.a11y.speak() announces it for screen reader users.
The two new button name identifiers (filter_action, post-query-submit) are registered alongside the existing bulk-action observer IDs in script-loader.php and remain filterable via the bulk_action_observer_ids filter for third-party extensibility.