variable_del

Versions
4.6 – 7
variable_del($name)

Unset a persistent variable.

Parameters

$name The name of the variable to undefine.

▾ 18 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.
multipage_form_example_delete in developer/examples/multipage_form_example.module
Implementation of hook_delete().
node_search in modules/node.module
Implementation of hook_search().
system_settings_form_submit in modules/system.module
Execute the system_settings_form.
system_themes_submit in modules/system.module
system_theme_settings_submit in modules/system.module
system_update_119 in database/updates.inc
system_update_126 in database/updates.inc
system_update_132 in database/updates.inc
system_update_135 in database/updates.inc
system_update_137 in database/updates.inc
system_update_141 in database/updates.inc
system_update_151 in database/updates.inc
system_update_161 in database/updates.inc
system_update_165 in database/updates.inc
system_update_177 in database/updates.inc
update_fix_schema_version in ./update.php
If the schema version for Drupal core is stored in the variables table (4.6.x and earlier) move it to the schema_version column of the system table.

Code

includes/bootstrap.inc, line 305

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

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

  unset($conf[$name]);
}
?>
Login or register to post comments
 
 

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.