You are here

function activity_token_replace in Activity 6

Same name and namespace in other branches
  1. 5.4 activity.module \activity_token_replace()
  2. 5 activity.module \activity_token_replace()
  3. 5.2 activity.module \activity_token_replace()
  4. 5.3 activity.module \activity_token_replace()

Determine what the message should say.

8 calls to activity_token_replace()
activity_block in ./activity.module
Implementation of hook_block().
activity_feed in ./activity.module
Menu callback for displaying site or user activity as an RSS feed.
activity_json in ./activity.module
Output activity as JSON.
activity_user in ./activity.module
Implementation of hook_user().
ogactivity_block in contrib/ogactivity/ogactivity.module
create a block for display

... See full list

File

./activity.module, line 1027
activity.module

Code

function activity_token_replace($activity) {
  extract($activity);
  $var = "{$module}_{$type}_{$operation}_{$target_role}";
  if ($pattern = variable_get($var, FALSE)) {

    // Invoke activityapi
    activity_invoke_activityapi($activity, 'render');
    $message = token_replace($pattern, $module, $data);
    $message = token_replace($message, 'activity', $data);
    return $message;
  }
}