#28402 closed enhancement (fixed)
Pass option name to pre_option_OPTION and pre_update_option_OPTION filters
| Reported by: | Viper007Bond | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | lowest | Milestone: | 4.4 |
| Component: | Options, Meta APIs | Version: | 3.9.1 |
| Severity: | trivial | Keywords: | needs-patch needs-docs |
| Cc: | Focuses: |
Description
If you want to hook a common callback function onto multiple pre_option_OPTION or pre_update_option_OPTION filters, you have to parse current_filter() to get what option is currently being modified. Instead we could just pass $option as another parameter.
Attachments (5)
Change History (32)
#2
@
12 years ago
28402.2.patch is a (probably overzealous) attempt to do this for other option filters.
#3
@
11 years ago
28402.4.diff is a refresh of .3.diff since it would not apply cleanly.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hmm, PhpStorm injected some stuff into the top of the patch file. Sorry about that.