function stickynav_admin_form in Sticky Navigation 6
Same name and namespace in other branches
- 7 admin/stickynav.admin.inc \stickynav_admin_form()
Admin form to set up the sticky nav logic.
1 string reference to 'stickynav_admin_form'
- stickynav_menu in ./
stickynav.module - Implements hook_menu().
File
- admin/
stickynav.admin.inc, line 10 - Contains implementation of admin settings form for the sticky navigation
Code
function stickynav_admin_form() {
$form = array();
$themes = list_themes();
foreach ($themes as $name => $data) {
// Only getting settings for enabled themes.
if ($data->status == 1) {
$form['stickynav-container=' . $name] = array(
'#title' => check_plain($data->info['name']),
'#type' => 'fieldset',
);
$form['stickynav-container=' . $name]['stickynav-enabled-' . $name] = array(
'#type' => 'checkbox',
'#title' => t('Enable'),
'#default_value' => variable_get('stickynav-enabled-' . $name, FALSE),
);
// Selector is only visible when you activate sticky nav for the theme.
$form['stickynav-container=' . $name]['stickynav-selector-' . $name] = array(
'#type' => 'textfield',
'#title' => t('Selector'),
'#description' => t('Place your selector for your menu that will be sticky on your theme. Use jquery format.'),
'#default_value' => variable_get('stickynav-selector-' . $name, ''),
);
$form['stickynav-container=' . $name]['stickynav-roles-' . $name] = array(
'#type' => 'checkboxes',
'#title' => t('Excluded Roles'),
'#description' => t("Exclude specific roles from using sticky navigation."),
'#options' => user_roles(),
'#default_value' => variable_get('stickynav-roles-' . $name, array()),
);
}
}
return system_settings_form($form);
}