You are here

function context_reaction_active_theme::execute in Context Reaction: Theme 6.2

Same name and namespace in other branches
  1. 7 plugins/context_reaction_theme.inc \context_reaction_active_theme::execute()

Set the active theme.

File

plugins/context_reaction_active_theme.inc, line 37

Class

context_reaction_active_theme
Expose themes as context reactions.

Code

function execute() {
  foreach (context_active_contexts() as $context) {
    if (!empty($context->reactions[$this->plugin]['theme'])) {
      global $custom_theme;
      $custom_theme = $context->reactions[$this->plugin]['theme'];
    }
  }
}