function context_reaction_css_injector::execute in Context 6
Same name and namespace in other branches
- 6.3 plugins/context_reaction_css_injector.inc \context_reaction_css_injector::execute()
- 7.3 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) {
if ($css_rule = _css_injector_load_rule($crid)) {
drupal_add_css(file_create_path($css_rule['file_path']), 'module', $css_rule['media'], $css_rule['preprocess']);
}
}
}
}
}