function variable_get

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

variable_del()

variable_set()

233 calls to variable_get()
ajax_base_page_theme in drupal/core/includes/ajax.inc
Theme callback: Returns the correct theme for an Ajax request.
block_admin_configure in drupal/core/modules/block/block.admin.inc
Form constructor for the block configuration form.
block_help in drupal/core/modules/block/block.module
Implements hook_help().
block_menu in drupal/core/modules/block/block.module
Implements hook_menu().
block_page_build in drupal/core/modules/block/block.module
Implements hook_page_build().

... See full list

1 string reference to 'variable_get'
system_test_menu in drupal/core/modules/system/tests/modules/system_test/system_test.module
Implements hook_menu().

File

drupal/core/includes/bootstrap.inc, line 1014
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;
}