function popup_onload_check_time_cookie in Popup On Load 7
Same name and namespace in other branches
- 8 popup_onload.module \popup_onload_check_time_cookie()
Check if popup_onload cookie is set.
3 calls to popup_onload_check_time_cookie()
- hook_popup_onload_check_display_conditions in ./
popup_onload.api.php - Check popup display conditions.
- popup_onload_condition_check_cookie in ./
popup_onload.rules.inc - Condition to check if popup cookie is set.
- popup_onload_popup_onload_check_display_conditions in ./
popup_onload.module - Implements hook_popup_onload_check_display_conditions().
File
- ./
popup_onload.module, line 222 - Contains main popup_onload hooks and functions.
Code
function popup_onload_check_time_cookie($popup_onload = NULL) {
$cookie_name = variable_get(POPUP_ONLOAD_VAR_COOKIE_NAME, POPUP_ONLOAD_DEFAULT_COOKIE_NAME);
if (isset($popup_onload) && !empty($popup_onload->cookie_lifetime_single)) {
$cookie_name .= '_' . $popup_onload->popup_id;
}
return isset($_COOKIE[$cookie_name]);
}