Same name and namespace in other branches
  1. 4.7.x includes/bootstrap.inc \variable_del()
  2. 5.x includes/bootstrap.inc \variable_del()
  3. 6.x includes/bootstrap.inc \variable_del()
  4. 7.x includes/bootstrap.inc \variable_del()

Unset a persistent variable.

Parameters

$name: The name of the variable to undefine.

4 calls to variable_del()
system_settings_save in modules/system.module
update_119 in database/updates.inc
update_126 in database/updates.inc
update_99 in database/updates.inc

File

includes/bootstrap.inc, line 182
Functions that need to be loaded on every Drupal request.

Code

function variable_del($name) {
  global $conf;
  db_query("DELETE FROM {variable} WHERE name = '%s'", $name);
  cache_clear_all('variables');
  unset($conf[$name]);
}