Opened 6 years ago
Closed 6 years ago
#5208 closed enhancement (wontfix)
New filter: pre_update_option_{option-name}
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.3 |
| Severity: | minor | Keywords: | update_option, pre_update_option, hook, filter, has-patch reporter-feedback |
| Cc: |
Description
The update_option function has an action hook on it but not a filter. We like filters.
Introducing pre_update_option_{option-name}. This will mainly serve as a method for plugins to filter their own options before they get saved to the database (user input sanitising, etc).
Attachments (1)
Change History (7)
johnbillion — 6 years ago
comment:2
foolswisdom — 6 years ago
- Milestone changed from 2.3.1 to 2.4
- Keywords reporter-feedback added
- Owner changed from anonymous to westi
- Status changed from new to assigned
What does this give you that the filter in sanitize_option doesn't?
sanitize_option_{$option}
comment:6
johnbillion — 6 years ago
- Milestone 2.4 deleted
- Resolution set to wontfix
- Status changed from assigned to closed
I never even realised there was a filter on sanitize_option. Hmm, this means this filter is superfluous.
Closing as RTFM.
Note: See
TracTickets for help on using
tickets.

Introducing pre_update_option_{option_name}