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

26 calls to variable_del()
color_scheme_form_submit in drupal/core/modules/color/color.module
Form submission handler for color_scheme_form().
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().
drupal_clear_css_cache in drupal/core/includes/common.inc
Deletes old cached CSS files.
drupal_cron_cleanup in drupal/core/includes/common.inc
Shutdown function: Performs cron cleanup.

... See full list

File

drupal/core/includes/bootstrap.inc, line 1059
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]);
}