wordpress / latest / hooks / default_option_option.html

apply_filters( "default_option_{$option}", mixed $default, string $option, bool $passed_default )

Filters the default value for an option.

Description

The dynamic portion of the hook name, $option, refers to the option name.

Parameters

$default mixed
The default value to return if the option does not exist in the database.
$option string
Option name.
$passed_default bool
Was get_option() passed a default value?

Source

File: wp-includes/option.php. View all references

return apply_filters( "default_option_{$option}", $default, $option, $passed_default );

Used By

Used By Description

Changelog

Version Description
4.7.0 The $passed_default parameter was added to distinguish between a false value and the default parameter value.
4.4.0 The $option parameter was added.
3.4.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/default_option_option