function flag_user_operations in Flag 6.2
Same name and namespace in other branches
- 7.3 flag.module \flag_user_operations()
- 7.2 flag.module \flag_user_operations()
Implementation of hook_user_operations().
File
- ./
flag.module, line 981 - The Flag module.
Code
function flag_user_operations() {
global $user;
$flags = flag_get_flags('user', NULL, $user);
$operations = array();
foreach ($flags as $flag) {
$operations['flag_' . $flag->name] = array(
'label' => $flag
->get_label('flag_short'),
'callback' => 'flag_users',
'callback arguments' => array(
'flag',
$flag->name,
),
);
$operations['unflag_' . $flag->name] = array(
'label' => $flag
->get_label('unflag_short'),
'callback' => 'flag_users',
'callback arguments' => array(
'unflag',
$flag->name,
),
);
}
return $operations;
}