function flag_content_extra_fields in Flag 6
Same name and namespace in other branches
- 6.2 flag.module \flag_content_extra_fields()
Implementation of hook_content_extra_fields().
Informations for non-CCK 'node fields' defined in core.
File
- ./
flag.module, line 223
Code
function flag_content_extra_fields($type_name) {
$extra = array();
$flags = flag_get_flags('node', $type_name);
// Filter out flags which need to be included on the node form.
foreach ($flags as $name => $flag) {
if (!$flag->show_on_form) {
unset($flags[$name]);
}
}
if (!empty($flags)) {
$extra['flag'] = array(
'label' => t('Flags'),
'description' => t('Flags fieldset.'),
'weight' => 0,
);
}
return $extra;
}