function admin_path_admin in Administrative pages 7
Form builder for the admin path configuration form.
1 string reference to 'admin_path_admin'
- admin_path_menu in ./
admin_path.module - Implements hook_menu().
File
- ./
admin_path.admin.inc, line 11 - Administrative page callbacks for the Administrative pages module.
Code
function admin_path_admin() {
$patterns = path_get_admin_paths();
$form['admin_path_include_aliases'] = array(
'#type' => 'checkbox',
'#title' => t('Include path aliases'),
'#default_value' => variable_get('admin_path_include_aliases', FALSE),
'#description' => t('When checked path aliases will be included.'),
);
$form['admin'] = array(
'#type' => 'textarea',
'#title' => t('Administrative pages'),
'#default_value' => $patterns['admin'],
'#description' => t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array(
'%blog' => 'blog',
'%blog-wildcard' => 'blog/*',
'%front' => '<front>',
)),
);
$form['non_admin'] = array(
'#type' => 'textarea',
'#title' => t('Exclusions'),
'#default_value' => $patterns['non_admin'],
'#description' => t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array(
'%blog' => 'blog',
'%blog-wildcard' => 'blog/*',
'%front' => '<front>',
)),
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
$form['actions']['restore'] = array(
'#type' => 'submit',
'#value' => t('Restore defaults'),
'#submit' => array(
'admin_path_admin_reset_submit',
),
);
return $form;
}