function nice_menus_menu in Nice Menus 5
Same name and namespace in other branches
- 6.2 nice_menus.module \nice_menus_menu()
- 6 nice_menus.module \nice_menus_menu()
- 7.3 nice_menus.module \nice_menus_menu()
- 7.2 nice_menus.module \nice_menus_menu()
Implemention of hook_menu().
File
- ./
nice_menus.module, line 63
Code
function nice_menus_menu($may_cache) {
if (!$may_cache) {
// Add JavaScript, if enabled.
if (variable_get('nice_menus_ie', 1) == 1) {
drupal_add_js(drupal_get_path('module', 'nice_menus') . '/nice_menus.js');
}
// Add main CSS functionality.
drupal_add_css(drupal_get_path('module', 'nice_menus') . '/nice_menus.css');
// Add custom CSS layout if specified.
if ($custom = variable_get('nice_menus_custom_css', '')) {
drupal_add_css($custom);
}
else {
drupal_add_css(drupal_get_path('module', 'nice_menus') . '/nice_menus_default.css');
}
}
else {
$items[] = array(
'path' => 'admin/settings/nice_menus',
'title' => t('Nice Menus'),
'description' => t('Configure Nice Menus.'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'nice_menus_admin_settings',
),
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
);
}
return $items;
}