function flag_flag_link in Flag 6.2
Same name and namespace in other branches
- 5 flag.module \flag_flag_link()
- 6 flag.module \flag_flag_link()
- 7.3 flag.module \flag_flag_link()
- 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),
);
}