function theme_signup_custom_data_field_text in Signup 7
Same name and namespace in other branches
- 6.2 theme/email.inc \theme_signup_custom_data_field_text()
- 6 theme/email.inc \theme_signup_custom_data_field_text()
Renders a single custom signup form field into unfiltered output.
Parameters
string $key: Name of the custom signup field (the array key).
string $value: Value of the custom signup field (the array value).
Return value
string Plain text output to display this key/value pair.
See also
2 theme calls to theme_signup_custom_data_field_text()
- signup_handler_field_signup_user_form_data::pre_render in views/
handlers/ signup_handler_field_signup_user_form_data.inc - Set each field value to "$key: $value" when rendering all fields.
- theme_signup_custom_data_email in theme/
email.inc - Renders custom signup data into unfiltered output for use in email.
File
- theme/
email.inc, line 69 - Theme functions for generating signup email messages.
Code
function theme_signup_custom_data_field_text($variables) {
$key = $variables['key'];
$value = $variables['value'];
// All of the possible array key values should already be translated as
// string literals in theme_signup_user_form() via the #title attributes, so
// passing a variable to t() is actually safe here. However, to avoid
// warnings when extracting strings, "hide" the call to t() by using a
// variable to hold the function name.
$tr = 't';
return $tr($key) . ': ' . $value;
}