function flag_content_enabled in Flag 6
Same name and namespace in other branches
- 5 flag.module \flag_content_enabled()
Content type checking to see if a flag applies to a certain type of data.
Parameters
$flag: The flag object whose available types are being checked.
$content_type: The type of content being checked, usually "node".
$content_subtype: The subtype (node type) being checked.
Return value
Boolean TRUE if the flag is enabled for this type and subtype. FALSE otherwise.
1 call to flag_content_enabled()
- flag_get_flags in ./
flag.module - List all flags available.
File
- ./
flag.module, line 132
Code
function flag_content_enabled($flag, $content_type, $content_subtype = NULL) {
$return = $flag->content_type == $content_type && (!isset($content_subtype) || in_array($content_subtype, $flag->types));
return $return;
}