apply_filters( “default_option_{$option}”, mixed $default_value, string $option, bool $passed_default )

In this article

Filters the default value for an option.

Description

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

Parameters

$default_valuemixed
The default value to return if the option does not exist in the database.
$optionstring
Option name.
$passed_defaultbool
Was get_option() passed a default value?

Source

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

Changelog

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

User Contributed Notes

You must log in before being able to contribute a note or feedback.