function uc_extra_fields_pane_tt in Extra Fields Checkout Pane 7
Same name and namespace in other branches
- 6.2 uc_extra_fields_pane.module \uc_extra_fields_pane_tt()
Wrapper for i18n_string_translate() function.
Parameters
string $name: The i18n string ID.
string $string: The string to translate.
array $options: An array of options to pass to i18n_string_translate().
Return value
string The translated string, if the i18n_string module is enabled and if there is a translation for the string. The inputted string otherwise. WARNING: Be sure to sanitize the returned string before using it for output.
See also
2 calls to uc_extra_fields_pane_tt()
- UCXF_Field::generate_value in class/
UCXF_Field.class.php - Generates the value for use in fields. This value will be used as a default value for textfields and as an array of options for selection fields.
- UCXF_Field::output in class/
UCXF_Field.class.php - Output a value with filtering
File
- ./
uc_extra_fields_pane.module, line 549 - Module: uc_extra_fields_pane.module
Code
function uc_extra_fields_pane_tt($name, $string, $options = array()) {
$options += array(
// Sanitizing of the string should be handled by the caller.
// This is because sanitizing should also happen when the i18n
// module is not used.
'sanitize' => FALSE,
);
return function_exists('i18n_string_translate') ? i18n_string_translate('ucxf:' . $name, $string, $options) : $string;
}