On this page
apply_filters( "pre_site_option_{$option}", mixed $pre_option, string $option, int $network_id, mixed $default )
Filters the value of an existing network option before it is retrieved.
Description
The dynamic portion of the hook name, $option, refers to the option name.
Returning a value other than false from the filter will short-circuit retrieval and return that value instead.
Parameters
$pre_optionmixed-
The value to return instead of the option value. This differs from
$default, which is used as the fallback value in the event the option doesn't exist elsewhere in get_network_option() .
Default false (to skip past the short-circuit). $optionstring-
Option name.
$network_idint-
ID of the network.
$defaultmixed-
The fallback value to return if the option does not exist.
Default false.
Source
File: wp-includes/option.php. View all references
$pre = apply_filters( "pre_site_option_{$option}", false, $option, $network_id, $default );
Related
Used By
| Used By | Description |
|---|---|
| get_network_option() wp-includes/option.php | Retrieves a network’s option value based on the option name. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_site_option_option