function mobile_navigation_page_build in Mobile Navigation 7
Same name and namespace in other branches
- 8 mobile_navigation.module \mobile_navigation_page_build()
- 7.2 mobile_navigation.module \mobile_navigation_page_build()
Implements hook_page_build().
File
- ./
mobile_navigation.module, line 63 - Mobile Navigation primary module file.
Code
function mobile_navigation_page_build() {
global $theme_key;
$current_theme = variable_get('theme_default', 'none');
if ($current_theme == $theme_key) {
drupal_add_js(drupal_get_path('module', 'mobile_navigation') . '/js/mobile_menu.js', array(
'preprocess' => FALSE,
));
drupal_add_js(drupal_get_path('module', 'mobile_navigation') . '/mobile_navigation.js', array(
'preprocess' => FALSE,
));
drupal_add_css(drupal_get_path('module', 'mobile_navigation') . '/mobile_navigation.css');
$settings = array(
'breakpoint' => variable_get('mobile_navigation_breakpoint', MOBILE_NAVIGATION_BREAKPOINT),
'menuSelector' => variable_get('mobile_navigation_menuselector', MOBILE_NAVIGATION_MENUSELECTOR),
'menuPlugin' => variable_get('mobile_navigation_plugin', MOBILE_NAVIGATION_PLUGIN),
'showEffect' => variable_get('mobile_navigation_showEffect', MOBILE_NAVIGATION_SHOWEFFECT),
'showItems' => variable_get('mobile_navigation_showitems', MOBILE_NAVIGATION_SHOWITEMS),
'tabHandler' => variable_get('mobile_navigation_tabhandler', MOBILE_NAVIGATION_TABHANDLER),
'menuWidth' => variable_get('mobile_navigation_width', MOBILE_NAVIGATION_WIDTH),
'specialClasses' => variable_get('mobile_navigation_special_classes', MOBILE_NAVIGATION_SPECIAL_CLASSES),
'mainPageSelector' => variable_get('mobile_navigation_mainPageSelector', MOBILE_NAVIGATION_PAGESELECTOR),
'useMask' => variable_get('mobile_navigation_useMask', MOBILE_NAVIGATION_USE_MASK),
'menuLabel' => t(variable_get('mobile_navigation_menu_label', MOBILE_NAVIGATION_MENU_LABEL)),
'expandActive' => variable_get('mobile_navigation_expand_active_trail', MOBILE_NAVIGATION_EXPAND_ACTIVE_TRAIL),
);
drupal_add_js(array(
'mobile_navigation' => $settings,
), 'setting');
}
}