apply_filters( "default_site_option_{$option}", mixed $default_value, string $option, int $network_id )
- Since
- 3.4.0, 4.4.0, 4.7.0
Filters the value of a specific default network option.
Description
The dynamic portion of the hook name,
$option, refers to the option name.Parameters
$default_valuemixed- The value to return if the site option does not exist in the database.
$optionstring- Option name.
$network_idint- ID of the network.
Fired at · 3
wp-includes/option.php:2083get_network_option()wp-includes/option.php:2088get_network_option()wp-includes/option.php:2111get_network_option()
Source
* * @param mixed $default_value The value to return if the site option does not exist * in the database. * @param string $option Option name. * @param int $network_id ID of the network. */ return apply_filters( "default_site_option_{$option}", $default_value, $option, $network_id ); } if ( ! is_multisite() ) { /** This filter is documented in wp-includes/option.php */ $default_value = apply_filters( 'default_site_option_' . $option, $default_value, $option, $network_id ); $value = get_option( $option, $default_value );History
Introduced in 3.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.7.0
The
$network_id parameter was added.from the docblock4.4.0
The
$option parameter was added.from the docblock3.4.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.