[wp-trac] [WordPress Trac] #37930: Introduce a general `pre_option` filter in `get_option()`
WordPress Trac
noreply at wordpress.org
Fri Oct 17 18:46:57 UTC 2025
#37930: Introduce a general `pre_option` filter in `get_option()`
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner:
| davidbaumwald
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.1
Component: Options, Meta APIs | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by johnjamesjacoby):
In [changeset:"60959" 60959]:
{{{
#!CommitTicketReference repository="" revision="60959"
Networks and Sites: add a general `pre_site_option` filter to
`get_network_option()`.
This change brings `get_network_option()` up-to-speed with `get_option()`
by adding a more generalized way to short-circuit its return value.
It also introduces 2 new unit tests: one to mirror an existing
`pre_option` test, and another to confirm that this new filter is working
as intended.
Props audrasjb, Drivingralle, johnjamesjacoby, jorbin, nimeshatxecurify,
rollybueno, shailu25, welcher, westonruter.
See #37930, r54145.
Fixes #56870.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37930#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list