function mmenu_add_js in Mobile sliding menu 7.2
Same name and namespace in other branches
- 7.3 mmenu.module \mmenu_add_js()
- 7 mmenu.module \mmenu_add_js()
Generates the mmenu js handler scripts and adds to Drupal.
Parameters
array $mmenu: An associative array of a mmenu.
1 call to mmenu_add_js()
- template_preprocess_mmenu in ./
mmenu.module - Processes variables for mmenu.tpl.php.
File
- ./
mmenu.module, line 873 - Primarily Drupal hooks and global API functions to manipulate mmenus.
Code
function mmenu_add_js(array $mmenu) {
// Uses custom js handler if it is set.
if (isset($mmenu['custom']['js'])) {
foreach ($mmenu['custom']['js'] as $js) {
drupal_add_js($js);
}
}
else {
$module_path = drupal_get_path('module', 'mmenu');
drupal_add_js($module_path . '/js/mmenu.js');
}
}