The print module is flagged as a 4.7.x module, but still uses the 'old' form API.
The print_settings function hereunder works in 4.7 without complaining:
function print_settings() {
$form['print_css'] = array(
'#type' => 'textfield',
'#title' => t('Stylesheet URL'),
'#default_value' => variable_get('print_css', 'misc/print.css'),
'#size' => 60,
'#maxlength' => 64,
'#description' => t('The URL to your print cascading stylesheet.'),
);
$form['print_urls'] = array(
'#type' => 'checkbox',
'#title' => t('Printer friendly URLs'),
'#return_value' => 1,
'#default_value' => variable_get('print_urls', 0),
);
$form['elements'] = array(
'#type' => 'fieldset',
'#title' => t('Print page elements'),
);
$form['elements']['print_show_link'] = array(
'#type' => 'radios',
'#title' => t('Printer friendly page link'),
'#default_value' => variable_get('print_show_link', 1),
'#options' => array(t("Disabled"), t("Enabled")),
'#description' => t("Enable or disable the 'printer friendly page' link for each node. Even if the link is disabled, you can still view the print version of a node by going to 'node/nid/print' where nid is the numeric id of the node."),
);
return $form;
}
Comments
Comment #1
rbrooks00 commentedI've submitted a patch for this here: http://drupal.org/node/42382 didn't see this issue before doing that.
Comment #2
peterjohnhartman commented