default_site_option_(option) filter-hook . WP 3.4.0
Filters a specific default network option.
The dynamic portion of the hook name, $option, refers to the option name.
Usage
add_filter( 'default_site_option_(option)', 'filter_function_name_8451', 10, 3 ); function filter_function_name_8451( $default, $option, $network_id ){ // filter... return $default; }
- $default(mixed)
- The value to return if the site option does not exist in the database.
- $option(string)
- Option name.
- $network_id(int)
- ID of the network.
Changelog
Since 3.4.0 | Introduced. |
Since 4.4.0 | The $option parameter was added. |
Since 4.7.0 | The $network_id parameter was added. |
Where the hook is called
wp-includes/option.php 1375
return apply_filters( "default_site_option_{$option}", $default, $option, $network_id );
wp-includes/option.php 1380
$default = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id );
wp-includes/option.php 1403
$value = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id );
Where in WP core the hook is used WordPress
wp-includes/ms-default-constants.php 20
add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );
wp-includes/ms-default-filters.php 126
add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );