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. 5.x includes/bootstrap.inc \variable_del()
  4. 6.x includes/bootstrap.inc \variable_del()

Unsets a persistent variable.

Case-sensitivity of the variable_* functions depends on the database collation used. To avoid problems, always use lower case for persistent variable names.

Parameters

$name: The name of the variable to undefine.

See also

variable_get()

variable_set()

85 calls to variable_del()
aggregator_sanitize_configuration in modules/aggregator/aggregator.module
Checks and sanitizes the aggregator configuration.
aggregator_uninstall in modules/aggregator/aggregator.install
Implements hook_uninstall().
announcements_feed_uninstall in modules/announcements_feed/announcements_feed.install
Implements hook_uninstall().
batch_test_stack in modules/simpletest/tests/batch_test.module
Helper function: store or retrieve traced execution data.
block_update_7004 in modules/block/block.install
Add new blocks to new regions, migrate custom variables to blocks.

... See full list

File

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

Code

function variable_del($name) {
  global $conf;
  db_delete('variable')
    ->condition('name', $name)
    ->execute();
  cache_clear_all('variables', 'cache_bootstrap');
  unset($conf[$name]);
}