Same name and namespace in other branches
- 4.6.x includes/bootstrap.inc \variable_del()
- 5.x includes/bootstrap.inc \variable_del()
- 6.x includes/bootstrap.inc \variable_del()
- 7.x includes/bootstrap.inc \variable_del()
Unset a persistent variable.
Parameters
$name: The name of the variable to undefine.
14 calls to variable_del()
- multipage_form_example_delete in developer/
examples/ multipage_form_example.module - Implementation of hook_delete().
- system_settings_form_submit in modules/
system.module - Execute the system_settings_form.
- system_theme_settings_submit in modules/
system.module - system_update_119 in database/
updates.inc - system_update_126 in database/
updates.inc
File
- includes/
bootstrap.inc, line 305 - 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]);
}