You are here

function high_contrast_uninstall in High contrast 7

Same name and namespace in other branches
  1. 8 high_contrast.install \high_contrast_uninstall()
  2. 6 high_contrast.install \high_contrast_uninstall()

Implements hook_uninstall().

File

./high_contrast.install, line 24
Install, update, and uninstall functions for the High Contrast module.

Code

function high_contrast_uninstall() {

  // Delete session variables.
  unset($_SESSION["high_contrast_activated"]);

  // Delete variables from db.
  $result = db_query('SELECT name FROM {variable} WHERE name LIKE :like', [
    ':like' => 'high_contrast_%',
  ]);
  foreach ($result as $row) {
    variable_del($row->name);
  }
}