You are here

function variable_format_text in Variable 7.2

Same name and namespace in other branches
  1. 6 variable.variable.inc \variable_format_text()
  2. 7 variable.variable.inc \variable_format_text()

Format text variable

1 string reference to 'variable_format_text'
variable_variable_type_info in ./variable.variable.inc
Implements hook_variable_type_info().

File

./variable.variable.inc, line 311
Variable module hook implementations

Code

function variable_format_text($variable, $options = array()) {
  if (empty($variable['value'])) {
    return '';
  }
  elseif (!empty($variable['allowed tags'])) {
    return filter_xss($variable['value'], $variable['allowed tags']);
  }
  else {
    return filter_xss_admin($variable['value']);
  }
}