You are here

function flag_flag_link in Flag 6.2

Same name and namespace in other branches
  1. 5 flag.module \flag_flag_link()
  2. 6 flag.module \flag_flag_link()
  3. 7.3 flag.module \flag_flag_link()
  4. 7.2 flag.module \flag_flag_link()

Implementation of hook_flag_link().

File

./flag.module, line 259
The Flag module.

Code

function flag_flag_link($flag, $action, $content_id) {
  $token = flag_get_token($content_id);
  return array(
    'href' => 'flag/' . ($flag->link_type == 'confirm' ? 'confirm/' : '') . "{$action}/{$flag->name}/{$content_id}",
    'query' => drupal_get_destination() . ($flag->link_type == 'confirm' ? '' : '&token=' . $token),
  );
}