function variable_format_selection in Variable 7.2
Same name and namespace in other branches
- 6 variable.variable.inc \variable_format_selection()
- 7 variable.variable.inc \variable_format_selection()
Format select variable
1 string reference to 'variable_format_selection'
- variable_variable_type_info in ./
variable.variable.inc - Implements hook_variable_type_info().
File
- ./
variable.variable.inc, line 184 - Variable module hook implementations
Code
function variable_format_selection($variable, $options = array()) {
$variable = variable_build_options($variable, $options);
if (isset($variable['value'])) {
return isset($variable['options'][$variable['value']]) ? $variable['options'][$variable['value']] : '<' . t('Invalid option') . '>';
}
else {
return variable_format_empty($variable);
}
}