Commit 4c80db2e authored by jcnventura's avatar jcnventura

Fix #388008: implement CCK's hook_cck_extra_fields to manage the order of the...

Fix #388008: implement CCK's hook_cck_extra_fields to manage the order of the per-content type settings
parent 3d1f2e45
......@@ -350,6 +350,10 @@ function print_form_alter(&$form, $form_state, $form_id) {
'#collapsed' => TRUE,
);
if (function_exists('cck_extra_field_weight')) {
$form['print']['#weight'] = cck_extra_field_weight($form['type']['#value'], 'print');
}
$form['print']['label'] = array(
'#type' => 'markup',
'#markup' => '<p><strong>'. t('Printer-friendly version') .'</strong></p>',
......@@ -383,6 +387,18 @@ function print_form_alter(&$form, $form_state, $form_id) {
}
}
/**
* Implementation of hook_cck_extra_fields.
*/
function print_cck_extra_fields($type_name) {
$fields['print'] = array(
'label' => t('Printer, e-mail and PDF versions'),
'description' => t('Print module form.'),
'weight' => 50,
);
return $fields;
}
/**
* Auxiliary function to assign the per-node settings to the node object fields
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment