function user_relationships_get_message in User Relationships 5
Same name and namespace in other branches
- 5.2 user_relationships_api.inc \user_relationships_get_message()
- 7 user_relationships.module \user_relationships_get_message()
Public API for getting the set or default message
Parameters
$key: string message name
$replacements: array replaceable tokens
Return value
string formatted message
8 calls to user_relationships_get_message()
- user_relationships_pending_requested_submit in ./
user_relationships_actions.inc - Approve, Disapprove, or Cancel a relationship request
- user_relationships_remove_submit in ./
user_relationships_actions.inc - Remove a relationship
- user_relationships_request in ./
user_relationships_forms.inc - Request a new relationship with another user
- user_relationships_request_submit in ./
user_relationships_actions.inc - Process relationship request.
- user_relationships_request_validate in ./
user_relationships_actions.inc - Validate relationship request.
File
- ./
user_relationships_api.inc, line 461
Code
function user_relationships_get_message($key, $replacements = array()) {
$msg = variable_get("user_relationships_msg_{$key}", NULL);
if (is_null($msg)) {
$messages = user_relationships_default_messages();
$msg = _user_relationships_get_from_array($key, $messages);
}
return t($msg, $replacements);
}