function example_style_js_settings in Responsive Menus 7
Same name and namespace in other branches
- 8 responsive_menus.api.php \example_style_js_settings()
Callback to generate settings to pass to javascript.
Return value
array Array of settings to pass to javascript, identified by their key. They can be accessed in javascript by: settings.responsive_menus.your_key.
1 string reference to 'example_style_js_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 107 - Hooks provided by the Responsive Menus module.
Code
function example_style_js_settings() {
$js_settings = array();
$js_settings['selectors'] = variable_get('responsive_menus_css_selectors', '#main-menu');
$js_settings['toggler_text'] = variable_get('responsive_menus_simple_text', '☰ Menu');
$js_settings['media_size'] = variable_get('responsive_menus_media_size', 768);
return $js_settings;
}