function announcements_content_register_content_type
Search API
6.x announcements.module | announcements_content_register_content_type() |
4.x announcements.module | announcements_content_register_content_type() |
5.x announcements.module | announcements_content_register_content_type() |
Implementatin of content's hook_content_register_content_type
Return value
unknown
File
- modules/
announcements/ announcements.module, line 16
Code
function announcements_content_register_content_type() {
$arr = array(
"announcement" => array(
"title" => t("Announcement"),
"description" => t("This is a short announcement to the user, meant to be displayed like news items in a block."),
"settings" => array(),
),
);
$fields ['activity_datetime'] = array(
'type' => 'datetime-local',
'label' => t('Date/Time'),
'value' => 'now',
'format_date' => 'short',
'weight' => 60,
'required' => TRUE,
);
$fields ['msg'] = array(
'type' => 'textarea_editor',
'label' => t('Message'),
'filter' => 'basic',
'weight' => 70,
);
$fields ['visibility'] = array(
'type' => 'radios',
'label' => 'Visible to:',
'options' => array('public' => 'Anyone (incl. student)', 'faculty' => 'Faculty/Staff only'),
'weight' => 80,
);
$arr ['announcement']['fields'] = $fields;
return $arr;
}