Implements hook_advagg_js_pre_alter().

Fichier

advagg_js_compress/advagg_js_compress.module, line 108

Code

function advagg_js_compress_advagg_js_pre_alter(&$javascript, $preprocess_js, $public_downloads, $scope) {
    if (module_exists('jquery_update')) {
        return;
    }
    foreach ($javascript as $type => $data) {
        if (!$data) {
            continue;
        }
        if ($type == 'setting' || $type == 'inline') {
            continue;
        }
        foreach ($data as $path => $info) {
            if ($path == 'misc/jquery.form.js') {
                $new_path = drupal_get_path('module', 'advagg_js_compress') . '/jquery.form.js';
                $javascript[$type][$new_path] = $info;
                unset($javascript[$type][$path]);
            }
        }
    }
}