function context_reaction_css_injector::execute in Context 7.3
Same name and namespace in other branches
- 6.3 plugins/context_reaction_css_injector.inc \context_reaction_css_injector::execute()
- 6 plugins/context_reaction_css_injector.inc \context_reaction_css_injector::execute()
File
- plugins/
context_reaction_css_injector.inc, line 21
Class
Code
function execute() {
$contexts = $this
->get_contexts();
foreach ($contexts as $context) {
if (!empty($context->reactions[$this->plugin])) {
foreach ($context->reactions[$this->plugin] as $crid => $enabled) {
if ($enabled && ($css_rule = _css_injector_load_rule($crid))) {
drupal_add_css(_css_injector_rule_uri($crid), 'module', $css_rule['media'], $css_rule['preprocess']);
}
}
}
}
}