anchorcms/anchor-cms — pull request #59 by BaylorRae (2012-02-16 21:56:56+00:00)
Title: Added Theme Options

I saw issue #58 and it seemed like a good idea and I wanted to add it to Anchor.

This is my first time editing this project and I wasn't completely sure where to add the `ThemeConfig::load()` call so I put it into `system/classes/template.php`, which may not be a desired place.

I mirrored the idea of `/config.php` for specific themes by autoloading `config.php` in the theme directory.

## themes/xxx/config.php

```
true,
'blue_color' => 'blue'
);
```

## Setting Options

```php

// setting multiple
set_theme_options(array(
'header_color' => 'blue',
'footer_color' => 'green'
));

// setting one
set_theme_options('header_color', 'green');
```

## Getting Options

```php

echo theme_option('header_color');

// setting a default value
echo theme_option('slogan', 'defined here!');
```