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

Filters the default value for an option.

Description Description

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

Top ↑

Parameters Parameters


(mixed) The default value to return if the option does not exist in the database.


(string) Option name.


(bool) Was get_option() passed a default value?

Top ↑

Source Source

File: wp-includes/option.php

View on Trac

Top ↑

Changelog 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.

Top ↑

User Contributed Notes User Contributed Notes

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