Same name in other branches
  1. 8.x-2.x advagg.module \advagg_get_current_hooks_hash()

Get the hash of all hooks and settings that affect aggregated files contents.

Return value

string hash value.

8 calls to advagg_get_current_hooks_hash()
advagg_admin_info_form dans ./advagg.admin.inc
Form builder; Show info about advagg and advagg settings.
advagg_build_filename dans ./advagg.inc
Build the filename.
advagg_generate_advagg_filename_from_db dans ./advagg.module
Given a advagg type this will return the most recent aggregate from the db.
advagg_get_render_cache dans ./advagg.module
Given the full css and js scope array return back the render cache.
advagg_mod_admin_settings_form dans advagg_mod/advagg_mod.admin.inc
Form builder; Configure advagg settings.

... See full list

1 string reference to 'advagg_get_current_hooks_hash'
advagg_push_new_changes dans ./advagg.cache.inc
Flush the correct caches so CSS/JS changes go live.

Fichier

./advagg.module, line 3499

Code

function advagg_get_current_hooks_hash() {
    $current_hash =& drupal_static(__FUNCTION__);
    if (empty($current_hash)) {
        // Get all advagg hooks and variables in use.
        $aggregate_settings = advagg_current_hooks_hash_array();
        // Generate the hash.
        $serialize_function = variable_get('advagg_serialize', ADVAGG_SERIALIZE);
        $current_hash = drupal_hash_base64($serialize_function($aggregate_settings));
        // Save into variables for verification purposes later on if not found.
        $settings = advagg_get_hash_settings($current_hash);
        if (empty($settings)) {
            // Save new hash into.
            advagg_set_hash_settings($current_hash, $aggregate_settings);
        }
    }
    return $current_hash;
}