You are here

function advagg_module_implements_alter in Advanced CSS/JS Aggregation 8.4

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

Implements hook_module_implements_alter().

Move advagg and various submodule's implementations to last.

File

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

Code

function advagg_module_implements_alter(&$implementations, $hook) {
  if ($hook === 'js_alter') {

    // Move advagg and advagg_mod to the bottom.
    if (isset($implementations['advagg_mod'])) {
      $item = $implementations['advagg_mod'];
      unset($implementations['advagg_mod']);
      $implementations['advagg_mod'] = $item;
    }
    $item = $implementations['advagg'];
    unset($implementations['advagg']);
    $implementations['advagg'] = $item;
  }
  elseif ($hook === 'css_alter') {
    if (isset($implementations['advagg_mod'])) {
      $item = $implementations['advagg_mod'];
      unset($implementations['advagg_mod']);
      $implementations['advagg_mod'] = $item;
    }
    $item = $implementations['advagg'];
    unset($implementations['advagg']);
    $implementations['advagg'] = $item;
  }
}