variable_del

includes/bootstrap.inc, line 182

Versions
4.6 – 7
variable_del($name)

Unset a persistent variable.

Parameters

$name The name of the variable to undefine.

▾ 8 functions call variable_del()

forum_taxonomy in modules/forum.module
Implementation of hook_taxonomy().
hook_search in developer/hooks/core.php
Define a custom search routine.
node_search in modules/node.module
Implementation of hook_search().
system_settings_save in modules/system.module
update_104 in database/updates.inc
update_119 in database/updates.inc
update_126 in database/updates.inc
update_99 in database/updates.inc

Code

<?php
function variable_del($name) {
  global $conf;

  db_query("DELETE FROM {variable} WHERE name = '%s'", $name);
  cache_clear_all('variables');

  unset($conf[$name]);
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.