[wp-trac] [WordPress Trac] #41254: Add $default to pre_option_{$option} filter
WordPress Trac
noreply at wordpress.org
Thu Jul 6 15:11:34 UTC 2017
#41254: Add $default to pre_option_{$option} filter
--------------------------------+---------------------------
Reporter: sc0ttkclark | Owner: DrewAPicture
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.9
Component: Options, Meta APIs | Version: 4.4
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
--------------------------------+---------------------------
Changes (by DrewAPicture):
* owner: => DrewAPicture
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"41013"]:
{{{
#!CommitTicketReference repository="" revision="41013"
Options: Pass `$default` as a new parameter to the `pre_option_{$option}`
and `pre_site_option_{$option}` filters.
This change standardizes some language in the parameter descriptions
between the two hook docs in an effort to reduce confusion between the
`$pre_option` pseudo-parameters and the new `$default` ones. `$pre_option`
is the truthy value used to short-circuit the `get_*option()` call,
`$default` is the value passed to the `get_*option()` returned in the
event that 1) a short circuit isn't performed, 2) the option doesn't
exist.
Props sc0ttkclark.
Fixes #41254.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41254#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list