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)

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

▾ 71 functions call variable_del()

aggregator_sanitize_configuration in modules/aggregator/aggregator.module
Checks and sanitizes the aggregator configuration.
aggregator_uninstall in modules/aggregator/aggregator.install
Implements hook_uninstall().
batch_test_stack in modules/simpletest/tests/batch_test.module
Helper function: store or retrieve traced execution data.
block_update_7004 in modules/block/block.install
Add new blocks to new regions, migrate custom variables to blocks.
blog_uninstall in modules/blog/blog.install
Implements hook_uninstall().
book_uninstall in modules/book/book.install
Implements hook_uninstall().
BootstrapVariableTestCase::testVariable in modules/simpletest/tests/bootstrap.test
testVariable
color_scheme_form_submit in modules/color/color.module
Form submission handler for color_scheme_form().
comment_node_type_delete in modules/comment/comment.module
Implements hook_node_type_delete().
comment_uninstall in modules/comment/comment.install
Implements hook_uninstall().
comment_update_7000 in modules/comment/comment.install
Rename comment display setting variables.
contact_uninstall in modules/contact/contact.install
Implements hook_uninstall().
contact_update_7000 in modules/contact/contact.install
Rename the threshold limit variable.
CronRunTestCase::testCronExceptions in modules/system/system.test
Make sure exceptions thrown on hook_cron() don't affect other modules.
dashboard_enable in modules/dashboard/dashboard.install
Implements hook_enable().
dashboard_uninstall in modules/dashboard/dashboard.install
Implements hook_uninstall().
dblog_uninstall in modules/dblog/dblog.install
Implements hook_uninstall().
drupal_clear_css_cache in includes/common.inc
Deletes old cached CSS files.
drupal_clear_js_cache in includes/common.inc
Deletes old cached JavaScript files and variables.
drupal_cron_cleanup in includes/common.inc
Shutdown function: Performs cron cleanup.
example_profile_tasks in developer/example.profile
Perform any final installation tasks for this profile.
field_sql_storage_update_7001 in modules/field/modules/field_sql_storage/field_sql_storage.install
Remove the field_config_entity_type table and store 'entity_type' strings.
filter_update_7001 in modules/filter/filter.install
Break out "escape HTML filter" option to its own filter.
filter_update_7003 in modules/filter/filter.install
Upgrade the {filter} table for core filters.
forum_uninstall in modules/forum/forum.install
Implements hook_uninstall().
hook_node_type_delete in modules/node/node.api.php
Respond to node type deletion.
hook_node_type_update in modules/node/node.api.php
Respond to node type updates.
hook_taxonomy_vocabulary_delete in modules/taxonomy/taxonomy.api.php
Respond to the deletion of taxonomy vocabularies.
hook_uninstall in modules/system/system.api.php
Remove any information that the module sets.
image_update_7003 in modules/image/image.install
Remove the variables that set alt and title length since they were not used for database column size and could cause PDO exceptions.
install_import_locales_remaining in includes/install.core.inc
Installation task; import remaining languages via a batch process.
install_profile_modules in includes/install.core.inc
Installation task; install required modules via a batch process.
install_run_task in includes/install.core.inc
Runs an individual installation task.
LocaleUILanguageNegotiationTest::testUILanguageNegotiation in modules/locale/locale.test
Tests for language switching by URL path.
locale_uninstall in modules/locale/locale.install
Implements hook_uninstall().
locale_update_7001 in modules/locale/locale.install
Upgrade language negotiation settings.
MenuTrailTestCase::testMenuTreeSetPath in modules/simpletest/tests/menu.test
Tests active trails are properly affected by menu_tree_set_path().
menu_rebuild in includes/menu.inc
(Re)populate the database tables used by various menu functions.
menu_update_7000 in modules/menu/menu.install
Migrate the "Default menu for content" setting to individual node types.
menu_update_7001 in modules/menu/menu.install
Rename "Primary Links" and "Secondary Links" to their Drupal 7 equivalents.
NodeQueryAlter::testNodeQueryAlterOverride in modules/node/node.test
Lower-level test of 'node_access' query alter override.
node_access_needs_rebuild in modules/node/node.module
Flag / unflag the node access grants for rebuilding, or read the current value of the flag.
node_type_delete_confirm_submit in modules/node/content_types.inc
Process content type delete confirm submissions.
node_type_form_submit in modules/node/content_types.inc
Form submission handler for node_type_form().
node_update_7004 in modules/node/node.install
Extend the existing default preview and teaser settings to all node types.
node_update_7006 in modules/node/node.install
Convert body and teaser from node properties to fields, and migrate status/comment/promote and sticky columns to the {node_revision} table.
OpenIDFunctionalTestCase::addRedirectedIdentity in modules/openid/openid.test
Add OpenID identity, changed by the following redirects, to user's profile.
profile_uninstall in modules/profile/profile.install
Implements hook_uninstall().
search_uninstall in modules/search/search.install
Implements hook_uninstall().
simpletest_uninstall in modules/simpletest/simpletest.install
Implements hook_uninstall().
statistics_uninstall in modules/statistics/statistics.install
Implements hook_uninstall().
syslog_uninstall in modules/syslog/syslog.install
Implements hook_uninstall().
system_image_toolkit_settings in modules/system/system.admin.inc
Form builder; Configure site image toolkit usage.
system_update_7004 in modules/system/system.install
Remove hardcoded numeric deltas from all blocks in core.
system_update_7005 in modules/system/system.install
Remove throttle columns and variables.
system_update_7009 in modules/system/system.install
Rename the variable for primary links.
system_update_7013 in modules/system/system.install
Convert default time zone offset to default time zone name.
system_update_7034 in modules/system/system.install
Migrate the file path settings and create the new {file_managed} table.
system_update_7046 in modules/system/system.install
Switch from the Minnelli theme if it is the default or admin theme.
system_update_7058 in modules/system/system.install
Remove cron semaphore variable.
system_update_7060 in modules/system/system.install
Create fields in preparation for migrating upload.module to file.module.
system_update_7066 in modules/system/system.install
Migrate the 'file_directory_temp' variable.
system_update_7069 in modules/system/system.install
Remove the obsolete 'site_offline' variable.
system_update_7070 in modules/system/system.install
Remove the obsolete 'drupal_badge_color' and 'drupal_badge_size' variables.
system_update_7072 in modules/system/system.install
Remove the obsolete 'site_offline_message' variable.
taxonomy_uninstall in modules/taxonomy/taxonomy.install
Implements hook_uninstall().
tracker_uninstall in modules/tracker/tracker.install
Implements hook_uninstall().
update_finished in includes/update.inc
Finish the update process and store results for eventual display.
update_settings_submit in modules/update/update.settings.inc
Submit handler for the settings tab.
update_uninstall in modules/update/update.install
Implements hook_uninstall().
user_update_7003 in modules/user/user.install
Update user settings for cancelling user accounts.

File

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

Code

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

  db_delete('variable')
    ->condition('name', $name)
    ->execute();
  cache_clear_all('variables', 'cache_bootstrap');

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