function context_reaction_theme::execute in Context 7.3
Same name and namespace in other branches
- 6.3 plugins/context_reaction_theme.inc \context_reaction_theme::execute()
- 6 plugins/context_reaction_theme.inc \context_reaction_theme::execute()
Set 'section_title', and 'section_subtitle' if not set
1 method overrides context_reaction_theme::execute()
- context_reaction_theme_html::execute in plugins/
context_reaction_theme_html.inc - Set additional classes onto the 'body_classes'.
File
- plugins/
context_reaction_theme.inc, line 56
Class
- context_reaction_theme
- Expose themes as context reactions.
Code
function execute(&$vars) {
$classes = array();
foreach ($this
->get_contexts() as $k => $v) {
if (!empty($v->reactions[$this->plugin]['title']) && !isset($vars['section_title'])) {
$vars['section_title'] = check_plain(t($v->reactions[$this->plugin]['title']));
}
if (!empty($v->reactions[$this->plugin]['subtitle']) && !isset($vars['section_subtitle'])) {
$vars['section_subtitle'] = check_plain(t($v->reactions[$this->plugin]['subtitle']));
}
}
}