Same name and namespace in other branches
  1. 4.6.x includes/bootstrap.inc \variable_del()
  2. 4.7.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.

29 calls to variable_del()
aggregator_uninstall in modules/aggregator/aggregator.install
Implementation of hook_uninstall().
color_scheme_form_submit in modules/color/color.module
Submit handler for color change form.
contact_uninstall in modules/contact/contact.install
Implementation of hook_uninstall().
drupal_cron_cleanup in includes/common.inc
Shutdown function for cron cleanup.
drupal_cron_run in includes/common.inc
Executes a cron run when called

... See full list

File

includes/bootstrap.inc, line 483
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', 'cache');
  unset($conf[$name]);
}