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

Implements hook_module_implements_alter().

Move advagg and various submodule's implementations to last.

Fichier

./advagg.module, line 17

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