function flag in Flag 6
Same name and namespace in other branches
- 5 flag.module \flag()
- 6.2 flag.module \flag()
- 7.3 flag.module \flag()
- 7.2 flag.module \flag()
Flags or unflags an item.
Parameters
$account: The user on whose behalf to flag. Leave empty for the current user.
Return value
FALSE if some error occured (e.g., user has no permission, flag isn't applicable to the item, etc.), TRUE otherwise.
5 calls to flag()
- flag_confirm_submit in ./
flag.module - flag_nodeapi in ./
flag.module - Implementation of hook_nodeapi().
- flag_nodes in ./
flag.module - Callback function for hook_node_operations().
- flag_page in ./
flag.module - Menu callback for (un)flagging a node.
- flag_rules_action_trim in includes/
flag.rules.inc - Base action implementation.
39 string references to 'flag'
- flag.tpl.php in theme/
flag.tpl.php - FlagTestCase::setUp in tests/
flag.test - Implementation of setUp().
- flag_actions_do in ./
flag_actions.module - Perform flag actions.
- flag_actions_form in ./
flag_actions.module - Generic configuration form for configuration of flag actions.
- flag_actions_token_actions_send_email_action_form in ./
flag_actions.module
File
- ./
flag.module, line 551
Code
function flag($action, $flag_name, $content_id, $account = NULL) {
if (!($flag = flag_get_flag($flag_name))) {
// Flag does not exist.
return FALSE;
}
return $flag
->flag($action, $content_id, $account);
}