Skip to content

Kirby 4.1.2

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');