function hook_responsive_menus_style_info in Responsive Menus 7
Same name and namespace in other branches
- 8 responsive_menus.api.php \hook_responsive_menus_style_info()
Example implementation of hook_responsive_menus_style_info().
You can use js/css_folder to load a whole directory's files, or js/css_files to load individual files.
The parameters 'form' & 'js_settings' are callbacks to functions.
Params when declaring hook_responsive_menus_style_info(): name :string: Name displayed when choosing style. form :string: Drupal FAPI callback for admin form. js_folder :string: Folder to recursively include .js files from. css_folder :string: Folder to recursively include .css files from. js_files :array: Individual JS files to include. css_files :array: Individual CSS files to include. js_settings :string: Function to generate settings to pass to JS. use_libraries :boolean: TRUE if uses libraries module to load. library :string: Name that the libraries module uses to load. jquery_version :float: Minimum jQuery version required for this style.
1 function implements hook_responsive_menus_style_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
1 invocation of hook_responsive_menus_style_info()
- responsive_menus_styles in ./
responsive_menus.module - Gather available styles for Responsive Menus.
File
- ./
responsive_menus.api.php, line 43 - Hooks provided by the Responsive Menus module.
Code
function hook_responsive_menus_style_info() {
$path = drupal_get_path('module', 'responsive_menus');
$styles = array(
'example_style' => array(
'name' => t('Example Responsive Menus style'),
'form' => 'example_style_settings',
'js_folder' => $path . '/js',
'css_folder' => $path . '/css',
'js_files' => array(
$path . '/js/example1.js',
$path . '/js/example2.js',
),
'css_files' => array(
$path . '/css/example.css',
),
'js_settings' => 'example_style_js_settings',
'use_libraries' => TRUE,
'library' => 'ExampleLibraryFolderName',
'jquery_version' => 1.7,
),
);
return $styles;
}