function 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()

17 calls to variable_del()
comment_node_type_delete in drupal/core/modules/comment/comment.module
Implements hook_node_type_delete().
comment_uninstall in drupal/core/modules/comment/comment.install
Implements hook_uninstall().
field_entity_bundle_delete in drupal/core/modules/field/field.attach.inc
Implements hook_entity_bundle_delete().
field_entity_bundle_rename in drupal/core/modules/field/field.attach.inc
Implements hook_entity_bundle_rename().
forum_uninstall in drupal/core/modules/forum/forum.install
Implements hook_uninstall().

... See full list

File

drupal/core/includes/bootstrap.inc, line 942
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('bootstrap')
    ->delete('variables');
  unset($conf[$name]);
}