@todo Please document this function.

See also

http://drupal.org/node/1354

1 call to advagg_install_theme_registry_location()
advagg_requirements in ./advagg.install
Implements hook_requirements().

File

./advagg.install, line 260

Code

function advagg_install_theme_registry_location($hooks) {
    drupal_theme_initialize();
    $hooks = $hooks['html']['process functions'];
    // Define hooks that we can safely ignore, that get executed after advagg.
    $ignored_hooks = array(
        'rdf_process',
        'labjs_process_html',
        'headjs_process_html',
        'designkit_process_html',
        'cdn_process_html',
        'conditional_styles_process_html',
    );
    // Call hook_advagg_theme_registry_alter().
    drupal_alter('advagg_theme_registry', $ignored_hooks);
    // Removed ignored hooks.
    foreach ($ignored_hooks as $hook) {
        $key = array_search($hook, $hooks);
        if ($key !== FALSE) {
            unset($hooks[$key]);
        }
    }
    $function = array_pop($hooks);
    return $function;
}