function advagg_mod_get_lists in Advanced CSS/JS Aggregation 8.2
Same name and namespace in other branches
- 7.2 advagg_mod/advagg_mod.module \advagg_mod_get_lists()
Generate a list of rules and exceptions for js files.
Controls no async/defer file list.
Return value
array A multidimensional array.
2 calls to advagg_mod_get_lists()
- advagg_mod_js_async_defer in advagg_mod/
advagg_mod.module - Add the defer and or the async tag to js.
- advagg_mod_sort_css_js in advagg_mod/
advagg_mod.module - Rearrange CSS/JS so that aggregates are better grouped.
File
- advagg_mod/
advagg_mod.module, line 197 - Advanced aggregation modifier module.
Code
function advagg_mod_get_lists() {
$lists =& drupal_static(__FUNCTION__);
if (!isset($lists)) {
// Do not defer/async list.
$no_async_defer_list = [
// Wistia js.
'//fast.wistia.',
// Maps.
'//maps.googleapis.com',
'//dev.virtualearth.net',
'//api.maps.yahoo.com',
];
$no_move = [
'//cdn.rawgit.com/stubbornella/csslint/master/release/csslint.js',
];
// Allow other modules to add/edit the above lists.
// Call hook_advagg_mod_get_lists_alter().
$lists = [
$no_async_defer_list,
$no_move,
];
\Drupal::moduleHandler()
->alter('advagg_mod_get_lists', $lists);
}
return $lists;
}