function privatemsg_form_alter in Privatemsg 5
Same name and namespace in other branches
- 5.3 privatemsg.module \privatemsg_form_alter()
- 7.2 privatemsg.module \privatemsg_form_alter()
- 7 privatemsg.module \privatemsg_form_alter()
Implementation of hook_form_alter().
File
- ./
privatemsg.module, line 404
Code
function privatemsg_form_alter($form_id, &$form) {
switch ($form_id) {
case 'node_type_form':
$link = variable_get('privatemsg_link_' . $form['#node_type']->type, array());
$form['workflow']['privatemsg_link'] = array(
'#type' => 'checkboxes',
'#title' => t('Private message "Write to author" links'),
'#weight' => 30,
'node' => array(
'#type' => 'checkbox',
'#title' => t('Link on node'),
'#default_value' => in_array('node', $link),
),
'teaser' => array(
'#type' => 'checkbox',
'#title' => t('Link on teaser'),
'#default_value' => in_array('teaser', $link),
),
'comment' => array(
'#type' => module_exists('comment') ? 'checkbox' : 'hidden',
'#title' => t('Link on comments'),
'#default_value' => in_array('comment', $link),
),
);
break;
}
}