You are here

function variable_get_value in Variable 6

Same name and namespace in other branches
  1. 7.2 variable.module \variable_get_value()
  2. 7 variable.module \variable_get_value()

Get value for simple scalar variable

Parameters

$options: Options array, it may have the following elements

  • language => Language object
  • default => Default value if not set
1 call to variable_get_value()
variable_form_element_default in ./variable.form.inc
Build default form element

File

./variable.module, line 93
Variable API module

Code

function variable_get_value($name, $options = array()) {
  $options += variable_status();
  $value = variable_get($name, NULL);
  if (isset($value)) {
    return $value;
  }
  else {
    return isset($options['default']) ? $options['default'] : variable_get_default($name, $options);
  }
}