Allow other modules to modify $js_groups right before it is processed.

Paramètres

array $js_groups: An associative array. key - group.

bool $preprocess_js: TRUE if preprocessing is enabled.

Voir aussi

_advagg_aggregate_js()

labjs_advagg_js_groups_alter()

Sujets associés

1 invocation of hook_advagg_js_groups_alter()
_advagg_aggregate_js dans ./advagg.module
Default callback to aggregate JavaScript files.

Fichier

./advagg.api.php, line 416

Code

function hook_advagg_js_groups_alter(array &$js_groups, $preprocess_js) {
    if (!$preprocess_js) {
        return;
    }
    $labjs_location = labjs_get_path();
    foreach ($js_groups as &$data) {
        foreach ($data['items'] as &$values) {
            if ($values['data'] == $labjs_location) {
                // Strictly enforce preprocess = FALSE for labjs.
                $values['preprocess'] = FALSE;
                $data['preprocess'] = FALSE;
                break 2;
            }
        }
        unset($values);
    }
    unset($data);
}