function advagg_get_current_hooks_hash in Advanced CSS/JS Aggregation 7.2
Same name and namespace in other branches
- 8.2 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 in ./
advagg.admin.inc - Form builder; Show info about advagg and advagg settings.
- advagg_build_filename in ./
advagg.inc - Build the filename.
- advagg_generate_advagg_filename_from_db in ./
advagg.module - Given a advagg type this will return the most recent aggregate from the db.
- advagg_get_render_cache in ./
advagg.module - Given the full css and js scope array return back the render cache.
- advagg_mod_admin_settings_form in advagg_mod/
advagg_mod.admin.inc - Form builder; Configure advagg settings.
1 string reference to 'advagg_get_current_hooks_hash'
- advagg_push_new_changes in ./
advagg.cache.inc - Flush the correct caches so CSS/JS changes go live.
File
- ./
advagg.module, line 3498 - Advanced CSS/JS aggregation module.
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;
}