function variable_del
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
File
- includes/bootstrap.inc, line 1250
- Functions that need to be loaded on every Drupal request.
Code
function variable_del($name) { global $conf; db_delete('variable') ->condition('name', $name) ->execute(); cache_clear_all('variables', 'cache_bootstrap'); unset($conf[$name]); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/variable_del/7.x