You are here

function privatemsg_rules_replace_tokens in Privatemsg 7.2

Same name and namespace in other branches
  1. 7 privatemsg_rules/privatemsg_rules.rules.inc \privatemsg_rules_replace_tokens()

Converts temporary token format ({token}) to real tokens.

3 calls to privatemsg_rules_replace_tokens()
privatemsg_rules_new in privatemsg_rules/privatemsg_rules.rules.inc
Helper function for sending a new message.
privatemsg_rules_new_role in privatemsg_rules/privatemsg_rules.rules.inc
Helper function for sending a new message to a role.
privatemsg_rules_reply in privatemsg_rules/privatemsg_rules.rules.inc
Helper function for replying to a thread.

File

privatemsg_rules/privatemsg_rules.rules.inc, line 200
Hooks and callback functions for rules.module integration.

Code

function privatemsg_rules_replace_tokens($text) {
  return preg_replace('/{([a-z0-9_:]+)}/', '[$1]', $text);
}