WordPress at a glance
filter is not described

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.


add_filter( 'default_site_option_(option)', 'filter_function_name_2871', 10, 3 );
function filter_function_name_2871( $default, $option, $network_id ){
	// filter...

	return $default;
The value to return if the site option does not exist in the database.
Option name.
ID of the network.

Список изменений

С версии 3.4.0 Введена.
С версии 4.4.0 The $option parameter was added.
С версии 4.7.0 The $network_id parameter was added.

Где вызывается хук

wp-includes/option.php 1374
return apply_filters( "default_site_option_{$option}", $default, $option, $network_id );
wp-includes/option.php 1379
$default = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id );
wp-includes/option.php 1402
$value = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id );

Где используется хук в ядре WP

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' );