function gravatar_var in Gravatar integration 6
Same name and namespace in other branches
- 5 gravatar.module \gravatar_var()
- 7 gravatar.module \gravatar_var()
Internal implementation of variable_get().
2 calls to gravatar_var()
- gravatar_get_gravatar in ./
gravatar.module - Generate a gravatar URL.
- gravatar_requirements in ./
gravatar.install - Implementation of hook_requirements().
File
- ./
gravatar.module, line 445 - Integrates gravatar service for user pictures.
Code
function gravatar_var($name, $default = NULL) {
static $defaults = NULL;
if (!isset($defaults)) {
$defaults = gravatar_variables();
}
$name = 'gravatar_' . $name;
// @todo Remove when stable.
if (!isset($defaults[$name])) {
trigger_error('Default variable for ' . theme_placeholder($name) . ' not found.');
}
return variable_get($name, isset($default) || !isset($defaults[$name]) ? $default : $defaults[$name]);
}