wppaste
WordPress

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:2081get_network_option()
  • wp-includes/option.php:2086get_network_option()
  • wp-includes/option.php:2109get_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.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

4.7.0
The $network_id parameter was added.from the docblock
4.4.0
The $option parameter was added.from the docblock
3.4.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 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.