function redirect_form_node_form_alter in Redirect 7.2
Same name and namespace in other branches
- 8 redirect.module \redirect_form_node_form_alter()
- 7 redirect.module \redirect_form_node_form_alter()
Implements hook_form_FORM_ID_alter().
Adds support for creating redirects if a node URL alias is changed.
File
- ./
redirect.module, line 497
Code
function redirect_form_node_form_alter(&$form, $form_state) {
if (!empty($form['path']['pid']['#value']) && !isset($form['path']['original'])) {
$form['path']['original'] = array(
'#type' => 'value',
'#value' => path_load($form['path']['pid']['#value']),
);
}
}