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

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