Opened 11 years ago
Closed 10 years ago
#28402 closed enhancement (fixed)
Pass option name to pre_option_OPTION and pre_update_option_OPTION filters
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | lowest |
Severity: | trivial | Version: | 3.9.1 |
Component: | Options, Meta APIs | Keywords: | needs-patch needs-docs |
Focuses: | Cc: |
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 (31)
#2
@
11 years ago
28402.2.patch is a (probably overzealous) attempt to do this for other option filters.
#3
@
10 years ago
28402.4.diff is a refresh of .3.diff since it would not apply cleanly.
#5
@
10 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 33738:
#6
@
10 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
I guess we'll need @since 4.4.0 Added ... parameter.
docs for each hook.
Note: See
TracTickets for help on using
tickets.
Hmm, PhpStorm injected some stuff into the top of the patch file. Sorry about that.