function flag_flag_link in Flag 7.2
Same name and namespace in other branches
- 5 flag.module \flag_flag_link()
- 6.2 flag.module \flag_flag_link()
- 6 flag.module \flag_flag_link()
- 7.3 flag.module \flag_flag_link()
Implements hook_flag_link().
File
- ./
flag.module, line 276 - 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' ? array() : array(
'token' => $token,
)),
);
}