function css_injector_context_page_reaction in Context 6.2
Implementation hook_context_page_reaction() on behalf of css injector.
File
- context_contrib/
context_contrib.module, line 193
Code
function css_injector_context_page_reaction() {
$css_rules = context_active_values('css_injector');
if (!empty($css_rules)) {
foreach ($css_rules as $crid) {
if ($css_rule = _css_injector_load_rule($crid)) {
if (function_exists('_css_injector_rule_path')) {
// Support for CSS Injector 1.4
drupal_add_css(_css_injector_rule_path($crid), 'module', $css_rule['media'], $css_rule['preprocess']);
}
else {
drupal_add_css(file_create_path($css_rule['file_path']), 'module', $css_rule['media'], $css_rule['preprocess']);
}
}
}
}
else {
return;
}
}