You are here

function comment_activity_objects_alter in Activity 6.2

Implementation of hook_activity_objects_alter().

File

modules/comment.activity.inc, line 83
Activity definition file for comment.module

Code

function comment_activity_objects_alter(&$token_objects, $activity_type) {
  if ($activity_type == 'comment') {
    $token_objects['node'] = node_load($token_objects['comment']->nid);

    // If the comment and the node are the same, provide an object for it.
    if (isset($token_objects['comment']) && $token_objects['node']->uid == $token_objects['comment']->uid) {
      $token_objects['node_comment_author'] = $token_objects['comment'];
    }
  }
}