function messaging_text_replace in Messaging 6
Same name and namespace in other branches
- 6.2 messaging.module \messaging_text_replace()
- 6.3 messaging.module \messaging_text_replace()
Do token replacement.
Uses token_logic if enabled, standard token replacement otherwise
File
- ./
messaging.module, line 812
Code
function messaging_text_replace($text, $objects) {
// Add some token types
$objects['global'] = NULL;
// Use token_logic if available, http://code.developmentseed.org/token_logic
// Otherwise use standard contrib token module, http://drupal.org/project/token
if (module_exists('token_logic')) {
return token_logic_replace_multiple($text, $objects);
}
else {
return token_replace_multiple($text, $objects);
}
}