function variable_get
7.x bootstrap.inc | variable_get($name, $default = NULL) |
6.x bootstrap.inc | variable_get($name, $default) |
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
615 calls to variable_get()
- ActionLoopTestCase::triggerActions in drupal-7.x/
modules/ simpletest/ tests/ actions.test - Create an infinite loop by causing a watchdog message to be set, which causes the actions to be triggered again, up to actions_max_stack times.
- actions_do in drupal-7.x/
includes/ actions.inc - Performs a given list of actions by executing their callback functions.
- AggregatorCronTestCase::testCron in drupal-7.x/
modules/ aggregator/ aggregator.test - Adds feeds and updates them via cron process.
- AggregatorTestCase::getDefaultFeedItemCount in drupal-7.x/
modules/ aggregator/ aggregator.test - Returns the count of the randomly created feed array.
- aggregator_admin_form in drupal-7.x/
modules/ aggregator/ aggregator.admin.inc - Form constructor for the aggregator system settings.
1 string reference to 'variable_get'
- system_test_menu in drupal-7.x/
modules/ simpletest/ tests/ system_test.module - Implements hook_menu().
File
- drupal-7.x/
includes/ bootstrap.inc, line 951 - 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;
}