#18082 closed enhancement (wontfix)
Reset screen options button
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | |
| Severity: | minor | Keywords: | |
| Cc: | chacha102 |
Description
It would be nice to have a "Reset" button in screen options to restore any given admin view back to the factory defaults.
Attachments (2)
Change History (9)
- Keywords ux-feedback added
- Owner set to danielbachhuber
- Status changed from new to accepted
danielbachhuber — 21 months ago
- Keywords has-patch 2nd-opinion added
resetscreen.18082.1.patch adds a "Reset to defaults" button for all screen options. When the user clicks on the reset button, all of their personal screen options for the current screen are reset to factory defaults.
The patch works fine, I think the code is satisfactory, but I'd love feedback on the approach. Ideally, we'd just write an actual class and API for manipulating screen options. This could work fine in the interim though.
I would keep the if() logic in set_screen_options() and reset_screen_options(), and consider combining your reset_screen_options() with set_screen_options() -- it's nice and easy to have a single POST handler here.
Patch looks alright at a glance, but there's a lot moving around, so we'd have to look closer.
There should also be a hook so a plugin can reset theirs too.
@nacin Added another patch per your recommendations. Specifically, I moved the $_POST checks to the methods (although I'd prefer to keep the set_ and reset_ methods separate because they do different things). Also, I added an action called 'reset_screen_options'.
- Keywords ux-feedback has-patch 2nd-opinion removed
- Resolution set to wontfix
- Status changed from accepted to closed
comment:7
SergeyBiryukov — 20 months ago
- Milestone Awaiting Review deleted

Functional first pass at adding a reset button for screen options