[wp-trac] [WordPress Trac] #56870: Introduce a general `pre_site_option` filter in `get_network_option()`

WordPress Trac noreply at wordpress.org
Fri Oct 17 18:46:57 UTC 2025


#56870: Introduce a general `pre_site_option` filter in `get_network_option()`
---------------------------------------------+-----------------------------
 Reporter:  Drivingralle                     |       Owner:
                                             |  johnjamesjacoby
     Type:  enhancement                      |      Status:  closed
 Priority:  normal                           |   Milestone:  6.9
Component:  Networks and Sites               |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  multisite
---------------------------------------------+-----------------------------
Changes (by johnjamesjacoby):

 * owner:  (none) => johnjamesjacoby
 * status:  new => closed
 * resolution:   => fixed


Comment:

 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/56870#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list