Skip to content

Kirby 5.0.4

option()

option(string $key, mixed $default = null): mixed

Parameters

Name Type Default
$keyrequired string no default value
$default mixed null

Return type

mixed

Examples

Fetch an option by key from the config:

$locale = option('locale', 'en');

Custom option

$myCustomOption = option('customOption');