You are here

function activity_views_bookmark_api in Activity 5

Implementation of hook_views_bookmark_api()

File

includes/views_bookmark.inc, line 36

Code

function activity_views_bookmark_api() {
  global $user;
  $args = func_get_args();
  $type = $args[1];
  $action = $args[0];
  $node = node_load($args[3]);
  $account = user_load(array(
    'uid' => $args[2],
  ));
  $tokens = array(
    'user-id' => $args[2],
    'user-name' => $account->name,
    'node-id' => $args[3],
    'node-title' => $node->title,
    'node-type' => $node->type,
  );
  activity_insert('views_bookmark', $type, $action, $tokens);
}