Same name and namespace in other branches
  1. 5.0.x advagg.module \advagg_module_implements_alter() 1 commentaire
  2. 6.0.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().

Fichier

./advagg.module, line 611

Code

function advagg_module_implements_alter(&$implementations, $hook) {
    // Move advagg_theme_registry_alter to the top.
    if ($hook === 'theme_registry_alter' && array_key_exists('advagg', $implementations)) {
        $item = array(
            'advagg' => $implementations['advagg'],
        );
        unset($implementations['advagg']);
        $implementations = array_merge($item, $implementations);
    }
    // Move advagg_ajax_render_alter to the top.
    if ($hook === 'ajax_render_alter' && array_key_exists('advagg', $implementations)) {
        $item = array(
            'advagg' => $implementations['advagg'],
        );
        unset($implementations['advagg']);
        $implementations = array_merge($item, $implementations);
    }
    // Move advagg_element_info_alter to the bottom.
    if ($hook === 'element_info_alter' && array_key_exists('advagg', $implementations)) {
        $item = $implementations['advagg'];
        unset($implementations['advagg']);
        $implementations['advagg'] = $item;
    }
    // Replace locale_js_alter with _advagg_locale_js_alter.
    if ($hook === 'js_alter' && array_key_exists('locale', $implementations)) {
        unset($implementations['locale']);
        $implementations['_advagg_locale'] = FALSE;
    }
    // Move advagg_file_url_alter to the bottom.
    if ($hook === 'file_url_alter' && array_key_exists('advagg', $implementations)) {
        $item = $implementations['advagg'];
        unset($implementations['advagg']);
        $implementations['advagg'] = $item;
    }
    if ($hook === 'requirements') {
        // Move advagg_requirements to the bottom.
        if (array_key_exists('advagg', $implementations)) {
            $item = $implementations['advagg'];
            unset($implementations['advagg']);
            $implementations['advagg'] = $item;
        }
        // Move advagg_css_cdn to the bottom.
        if (array_key_exists('advagg_css_cdn', $implementations)) {
            $item = $implementations['advagg_css_cdn'];
            unset($implementations['advagg_css_cdn']);
            $implementations['advagg_css_cdn'] = $item;
        }
        // Move advagg_css_compress to the bottom.
        if (array_key_exists('advagg_css_compress', $implementations)) {
            $item = $implementations['advagg_css_compress'];
            unset($implementations['advagg_css_compress']);
            $implementations['advagg_css_compress'] = $item;
        }
        // Move advagg_js_cdn to the bottom.
        if (array_key_exists('advagg_js_cdn', $implementations)) {
            $item = $implementations['advagg_js_cdn'];
            unset($implementations['advagg_js_cdn']);
            $implementations['advagg_js_cdn'] = $item;
        }
        // Move advagg_js_compress to the bottom.
        if (array_key_exists('advagg_js_compress', $implementations)) {
            $item = $implementations['advagg_js_compress'];
            unset($implementations['advagg_js_compress']);
            $implementations['advagg_js_compress'] = $item;
        }
    }
    // Move advagg_cron to the bottom.
    if ($hook === 'cron' && array_key_exists('advagg', $implementations)) {
        $item = $implementations['advagg'];
        unset($implementations['advagg']);
        $implementations['advagg'] = $item;
    }
}