Implements hook_theme_registry_alter().

Insert advagg_mod_process_move_js before _advagg_process_html.

Fichier

advagg_mod/advagg_mod.module, line 518

Code

function advagg_mod_theme_registry_alter(&$theme_registry) {
    if (!module_exists('advagg') || !advagg_enabled()) {
        return;
    }
    if (!isset($theme_registry['html'])) {
        return;
    }
    // Find template_process_html/_advagg_process_html.
    $index = array_search('_advagg_process_html', $theme_registry['html']['process functions']);
    if ($index === FALSE) {
        $index = array_search('template_process_html', $theme_registry['html']['process functions']);
        if ($index === FALSE) {
            return;
        }
    }
    // Insert advagg_mod_process_move_js before _advagg_process_html.
    array_splice($theme_registry['html']['process functions'], $index, 0, 'advagg_mod_process_move_js');
}