You are here

static function FlagGlobalCookieStorage::drop in Flag 6.2

Same name and namespace in other branches
  1. 7.3 includes/flag.cookie_storage.inc \FlagGlobalCookieStorage::drop()
  2. 7.2 flag.inc \FlagGlobalCookieStorage::drop()

Deletes all the global cookies.

Overrides FlagCookieStorage::drop

1 call to FlagGlobalCookieStorage::drop()
FlagCookieStorage::drop in ./flag.inc
Deletes all the cookies.

File

./flag.inc, line 1866
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

FlagGlobalCookieStorage
Storage handler for global flags.

Code

static function drop() {
  foreach ($_COOKIE as $key => $value) {
    if (strpos($key, 'flag_global_') === 0) {
      setcookie($key, FALSE, 0, base_path());
      unset($_COOKIE[$key]);
    }
  }
}