You are here

function ds_variable_get in Display Suite 6.3

Same name and namespace in other branches
  1. 6.2 ds.module \ds_variable_get()

Module-aware version of variable_get

File

./ds.module, line 269

Code

function ds_variable_get($var_name, $default = '') {
  $value = $default;
  if (ds_static_variables($var_name)) {
    $value = ds_static_variables($var_name);
  }
  elseif (module_exists('variable') && function_exists('variable_get_value')) {
    global $language;
    $value = variable_get_value($var_name, array(
      'default' => $default,
      'language' => $language,
    ));
  }
  else {
    $value = variable_get($variable_name, $default);
  }
  return $value;
}