function rename_admin_paths_settings in Rename Admin Paths 7
Same name and namespace in other branches
- 7.2 rename_admin_paths.module \rename_admin_paths_settings()
Implements hook_menu().
1 string reference to 'rename_admin_paths_settings'
- rename_admin_paths_menu in ./
rename_admin_paths.module - Implements hook_menu().
File
- ./
rename_admin_paths.module, line 168 - Allows users to rename admin paths
Code
function rename_admin_paths_settings() {
$form = array();
$form['rename_admin_path'] = array(
'#type' => 'fieldset',
'#title' => t('Rename Admin Path'),
);
$form['rename_admin_path']['rename_admin_path'] = array(
'#type' => 'checkbox',
'#title' => t('Rename Admin Path'),
'#default_value' => variable_get('rename_admin_path', NULL),
'#description' => t('If checked, "admin" will be replaced by the following term in admin path.'),
);
$form['rename_admin_path']['rename_admin_path_value'] = array(
'#type' => 'textfield',
'#title' => t('Replace "admin" in admin path by'),
'#default_value' => variable_get('rename_admin_path_value', 'backend'),
'#description' => t('This value will replace "admin" in admin path.'),
'#element_validate' => array(
'rename_admin_paths_form_validate_path_field',
),
);
$form['rename_user_path'] = array(
'#type' => 'fieldset',
'#title' => t('Rename User Path'),
);
$form['rename_user_path']['rename_user_path'] = array(
'#type' => 'checkbox',
'#title' => t('Rename User Path'),
'#default_value' => variable_get('rename_user_path', NULL),
'#description' => t('If checked, "user" will be replaced by the following term in user path.'),
'#element_validate' => array(
'rename_admin_paths_form_validate_path_field',
),
);
$form['rename_user_path']['path_user_value'] = array(
'#type' => 'textfield',
'#title' => t('Replace "user" in user path by'),
'#default_value' => variable_get('rename_user_path_value', 'member'),
'#description' => t('This value will replace "user" in user path.'),
'#element_validate' => array(
'rename_admin_paths_form_validate_path_field',
),
);
return system_settings_form($form);
}