Skip to content

Kirby 3.9.8

option()

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

Parameters

Name Type Default
$key * string
$default mixed null

Return type

mixed|null

Example

Fetch an option by key from the config:

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

Custom option

$myCustomOption = option('customOption');