function example_style_settings in Responsive Menus 7
Same name and namespace in other branches
- 8 responsive_menus.api.php \example_style_settings()
Additional style settings for the Responsive Menus admin form.
You aren't returning an entire form, just some additional options that go within the style settings fieldset of the Responsive Menus admin form.
You are in charge of your own #default_values.
Return value
array Drupal FAPI formatted array.
1 string reference to 'example_style_settings'
- hook_responsive_menus_style_info in ./
responsive_menus.api.php - Example implementation of hook_responsive_menus_style_info().
File
- ./
responsive_menus.api.php, line 77 - Hooks provided by the Responsive Menus module.
Code
function example_style_settings() {
$form['responsive_menus_css_selectors'] = array(
'#type' => 'textarea',
'#title' => t('CSS selectors for which menus to responsify'),
'#default_value' => variable_get('responsive_menus_css_selectors', '.main-menu'),
'#description' => t('Enter CSS selectors of menus to responsify. Comma separated or 1 per line'),
);
$form['responsive_menus_simple_text'] = array(
'#type' => 'textfield',
'#title' => t('Text to display for menu toggle button'),
'#default_value' => variable_get('responsive_menus_simple_text', '☰ Menu'),
);
$form['responsive_menus_media_size'] = array(
'#type' => 'textfield',
'#title' => t('Screen width to respond to'),
'#size' => 10,
'#default_value' => variable_get('responsive_menus_media_size', 768),
'#description' => t('Width in pixels when we swap out responsive menu e.g. 768'),
);
return $form;
}