# Options

- Read more: <https://getkirby.com/docs/guide/configuration>

****

## Registering options

Options are registered with the `options` extension. The extension accepts an array of options with their default values. The default values will be used if the options are not overwritten in the site config.

```php
Kirby::plugin('yourname/yourplugin', [
    'options' => [
        'option' => 'some-value',
        'another-option' => [
            'with-a-nested-option' => 'and values'
        ]
    ]
]);
```

## Setting custom options in the site config

See <a href="https://getkirby.com/docs/guide/configuration#the-config-php__plugin-options">the guide</a>.

## Accessing option values

Config options can be used anywhere in Kirby with the `$kirby->option()` method:

```php
$kirby->option('yourname.yourplugin.option');
$kirby->option('yourname.yourplugin.another-option.with-a-nested-option');
```

Or with the `option()` helper:

```php
option('yourname.yourplugin.option');
option('yourname.yourplugin.another-option.with-a-nested-option');
```