You are here

function advagg_js_alter in Advanced CSS/JS Aggregation 7.2

Same name and namespace in other branches
  1. 8.4 advagg.module \advagg_js_alter()
  2. 8.2 advagg.module \advagg_js_alter()
  3. 8.3 advagg.module \advagg_js_alter()

Implements hook_js_alter().

File

./advagg.module, line 1259
Advanced CSS/JS aggregation module.

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';
    }
  }
}