[wp-trac] [WordPress Trac] #56045: Add filters to allow the shortcut return for the get options functions
WordPress Trac
noreply at wordpress.org
Wed Jun 22 21:02:51 UTC 2022
#56045: Add filters to allow the shortcut return for the get options functions
--------------------------------+------------------------
Reporter: pbearne | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Options, Meta APIs | Version:
Severity: normal | Resolution: duplicate
Keywords: has-patch | Focuses:
--------------------------------+------------------------
Old description:
New description:
the current filter assumes that you know the name of the filter
This is a general filter that filters "ALL" options
--
Comment (by pbearne):
Replying to [comment:1 joyously]:
> The Code Reference for `get_option` says
> > When one of the Options API filters is used: `pre_option_$option`,
`default_option_$option`, or `option_$option`, the returned value may not
match the expected type.
>
> So, there are already filters. Exactly which functions need which
filters?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56045#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list