function trailing_slash_form_globalredirect_settings_alter in Trailing Slash 7
Implements hook_form_FORM_ID_alter().
Change GlobalRedirect settings form to allow enforcement of trailing slashes.
File
- ./
trailing_slash.module, line 147 - Adds checkbox to the Clean URLs settings form and alters outbound URLs.
Code
function trailing_slash_form_globalredirect_settings_alter(&$form, &$form_state, $form_id) {
if (variable_get('trailing_slash', TRUE)) {
$form['settings']['deslash'] = array_merge($form['settings']['deslash'], array(
'#title' => t('Enforce trailing slash'),
'#description' => t('If enabled, this option will enforce the trailing slash in requests. This stops requests such as example.com/node/1/ and example.com/node/1 causing duplicate content. On the other hand, if you require certain requests to not have a trailing slash, this feature can cause problems so may need to be disabled.'),
));
}
}