function advagg_advagg_css_pre_alter in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 6 advagg.module \advagg_advagg_css_pre_alter()
Implements hook_advagg_css_pre_alter().
File
- ./
advagg.module, line 3071 - Advanced CSS/JS aggregation module
Code
function advagg_advagg_css_pre_alter(&$css, $preprocess_css, $scheme) {
// Don't run the code below if ctools ajax is not loaded.
if (!defined('CTOOLS_AJAX_INCLUDED')) {
return;
}
// Get all CSS files set to be loaded.
$css_files = array();
ctools_process_css_files($css_files, $css);
// Save to the js settings array.
drupal_add_js(array(
'CToolsAJAX' => array(
'css' => $css_files,
),
), array(
'type' => 'setting',
'scope' => 'footer',
));
}