You are here

function context_theme_context_reactions in Context Reaction: Theme 6

Implementation of hook_context_reactions().

File

./context_theme.module, line 16

Code

function context_theme_context_reactions() {
  $items = array();
  $options = array();
  $themes = list_themes();
  foreach ($themes as $name => $theme) {
    if ($theme->status == 1) {
      $options[$name] = $name;
    }
  }
  $items['theme'] = array(
    '#title' => t('Theme'),
    '#description' => t('Activate a given theme when this context is set.'),
    '#options' => $options,
    '#type' => 'checkboxes',
  );
  return $items;
}