function advagg_file_aggregation_enabled in Advanced CSS/JS Aggregation 7.2
Given the type lets us know if advagg is enabled or disabled.
Parameters
string $type: String: css or js.
Return value
bool TRUE or FALSE.
3 calls to advagg_file_aggregation_enabled()
- advagg_get_render_cache in ./
advagg.module - Given the full css and js scope array return back the render cache.
- _advagg_aggregate_css in ./
advagg.module - Default callback to aggregate CSS files and inline content.
- _advagg_aggregate_js in ./
advagg.module - Default callback to aggregate JavaScript files.
File
- ./
advagg.module, line 3873 - Advanced CSS/JS aggregation module.
Code
function advagg_file_aggregation_enabled($type) {
if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE === 'update') {
return FALSE;
}
if (isset($_GET['advagg']) && $_GET['advagg'] == 0 && user_access('bypass advanced aggregation')) {
return FALSE;
}
if ($type === 'css') {
return variable_get('preprocess_css', FALSE);
}
if ($type === 'js') {
return variable_get('preprocess_js', FALSE);
}
}