function popup_cache_attributes in Popup 7.x
Same name and namespace in other branches
- 8 includes/popup.util.inc \popup_cache_attributes()
- 7 includes/popup.util.inc \popup_cache_attributes()
2 calls to popup_cache_attributes()
- popup_get_ahah in includes/
popup.util.inc - theme_popup_ahah_placeholder in includes/
popup.theme.inc
File
- includes/
popup.util.inc, line 406
Code
function popup_cache_attributes($cache) {
$attrib_cache = FALSE;
if (!$attrib_cache) {
$attrib_cache = variable_get('popup_ajax_cache', array());
}
if (is_array($cache)) {
$hash = md5(serialize($cache));
$attrib_cache[$hash] = $cache;
variable_set('popup_ajax_cache', $attrib_cache);
return $hash;
}
else {
return $attrib_cache[$cache];
}
}