Same name in other branches
  1. 5.0.x advagg.module \advagg_js_alter()
  2. 6.0.x advagg.module \advagg_js_alter()
  3. 8.x-2.x advagg.module \advagg_js_alter()
  4. 8.x-3.x advagg.module \advagg_js_alter()
  5. 8.x-4.x advagg.module \advagg_js_alter()

Implements hook_js_alter().

Fichier

./advagg.module, line 1260

Code

function advagg_js_alter(&$js) {
    if (module_exists('admin_menu')) {
        // Fix for admin menu; put JS in footer.
        $path = drupal_get_path('module', 'admin_menu');
        $filename = $path . '/admin_menu.js';
        if (isset($js[$filename])) {
            $js[$filename]['scope'] = 'footer';
        }
    }
}