variable_get
function variable_get
variable_get($name, $default = NULL)
Returns 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 return.
$default: The default value to use if this variable has never been set.
Return value
The value of the variable. Unserialization is taken care of as necessary.
See also
File
- includes/bootstrap.inc, line 1205
- Functions that need to be loaded on every Drupal request.
Code
function variable_get($name, $default = NULL) { global $conf; return isset($conf[$name]) ? $conf[$name] : $default; }
© 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_get/7.x