Community Documentation

variable_del

5 bootstrap.inc variable_del($name)
6 bootstrap.inc variable_del($name)
7 bootstrap.inc variable_del($name)
8 bootstrap.inc variable_del($name)

Unset a persistent variable.

Parameters

$name: The name of the variable to undefine.

▾ 34 functions call variable_del()

aggregator_uninstall in modules/aggregator/aggregator.install
Implementation of hook_uninstall().
color_scheme_form_submit in modules/color/color.module
Submit handler for color change form.
contact_uninstall in modules/contact/contact.install
Implementation of hook_uninstall().
drupal_cron_cleanup in includes/common.inc
Shutdown function for cron cleanup.
drupal_cron_run in includes/common.inc
Executes a cron run when called
drupal_uninstall in modules/drupal/drupal.install
Implementation of hook_uninstall().
forum_taxonomy in modules/forum/forum.module
Implementation of hook_taxonomy().
forum_uninstall in modules/forum/forum.install
Implementation of hook_uninstall().
hook_node_type in developer/hooks/node.php
Act on node type changes.
hook_search in developer/hooks/core.php
Define a custom search routine.
hook_uninstall in developer/hooks/install.php
Remove any tables or variables that the module sets.
multipage_form_example_delete in developer/examples/multipage_form_example.module
Implementation of hook_delete().
node_search in modules/node/node.module
Implementation of hook_search().
node_type_form_submit in modules/node/content_types.inc
Implementation of hook_form_submit().
profile_uninstall in modules/profile/profile.install
Implementation of hook_uninstall().
search_uninstall in modules/search/search.install
Implementation of hook_uninstall().
statistics_uninstall in modules/statistics/statistics.install
Implementation of hook_uninstall().
system_settings_form_submit in modules/system/system.module
Execute the system_settings_form.
system_themes_submit in modules/system/system.module
system_theme_settings_submit in modules/system/system.module
system_update_1005 in modules/system/system.install
system_update_1014 in modules/system/system.install
system_update_1020 in modules/system/system.install
Change break tag back (was removed from head).
system_update_119 in modules/system/system.install
system_update_126 in modules/system/system.install
system_update_132 in modules/system/system.install
system_update_135 in modules/system/system.install
system_update_137 in modules/system/system.install
system_update_141 in modules/system/system.install
system_update_151 in modules/system/system.install
system_update_161 in modules/system/system.install
system_update_165 in modules/system/system.install
system_update_177 in modules/system/system.install
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.

File

includes/bootstrap.inc, line 483
Functions that need to be loaded on every Drupal request.

Code

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

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

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