function print_form_alter in Printer, email and PDF versions 5
Same name and namespace in other branches
- 5.4 print.module \print_form_alter()
- 5.2 print.module \print_form_alter()
- 5.3 print.module \print_form_alter()
- 6 print.module \print_form_alter()
- 7 print.module \print_form_alter()
- 5.x print.module \print_form_alter()
File
- ./
print.module, line 73 - Display printer friendly versions of nodes (except books)
Code
function print_form_alter($form_id, &$form) {
// Add the node-type settings option to activate the printer friendly version link
if ('node_type_form' == $form_id) {
$form['workflow']['print_display'] = array(
'#type' => 'checkbox',
'#title' => t('Show printer-friendly version link'),
'#return_value' => 1,
'#default_value' => variable_get('print_display_' . $form['#node_type']->type, '1'),
'#description' => t('Displays the link to a printer friendly version of the content. Further configuration is available on the !settings.', array(
'!settings' => l(t('settings page'), 'admin/settings/print'),
)),
);
}
/* elseif ('comment_admin_settings' == $form_id) {
$form['viewing_options']['print_display_comment'] = array(
'#type' => 'checkbox',
'#title' => t('Show printer-friendly version link'),
'#return_value' => 1,
'#default_value' => variable_get('print_display_comment', '1'),
'#description' => t('Displays the link to a printer friendly version of the content. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/print' ))),
);
}*/
}