function _myu_language_dropdown($type = 'language')
{
    if (drupal_multilingual()) {
        global $language_url;
        $path = drupal_is_front_page() ? '<front>' : $_GET['q'];
        //$type = 'language_url';
        $languages = language_negotiation_get_switch_links($type, $path);
        $items = array();
        foreach ($languages->links as $lang_code => $lang_options) {
            if ($lang_options['language']->language === $language_url->language) {
                // Icon for the selected language
                if (module_exists('languageicons')) {
                    $icon = theme('languageicons_icon', array('language' => (object) array('language' => $lang_code), 'title' => $language_url->native));
                }
                $active_language_text = $icon . '<span class="langname">' . strtoupper($language_url->language) . '</span><i class="fa fa-angle-down"></i>';
                $active_language_link = l($active_language_text, 'javascript:;', array('html' => TRUE, 'external' => TRUE, 'attributes' => array('class' => 'dropdown-toggle', 'data-close-others' => 'true', 'data-hover' => 'dropdown', 'data-toggle' => 'dropdown')));
            } else {
                if (!isset($lang_options['query'])) {
                    $lang_options['query'] = drupal_get_query_parameters();
                }
                $items[] = l($lang_options['title'], $lang_options['href'], $lang_options);
            }
        }
        $language_flag_list = theme('item_list', array('items' => $items, 'type' => 'ul', 'attributes' => array('class' => 'dropdown-menu dropdown-menu-default')));
        return '<ul class="menu nav navbar-nav language"><li class="dropdown dropdown-language">' . $active_language_link . $language_flag_list . '</li></ul>';
    }
}
 private function _content_menu_multilanguage_support($menuname)
 {
     $i18n_mode = 0;
     $menu = menu_load($menuname);
     $i18n_mode = $menu && isset($menu['i18n_mode']) ? $menu['i18n_mode'] : 0;
     return drupal_multilingual() && $i18n_mode != 0;
 }
示例#3
0
文件: Session.php 项目: kingsj/core
 /**
  * Get current language
  *
  * @return string Language code
  */
 protected function getCurrentLanguage()
 {
     // DO NOT change call order here
     if (!\XLite::isAdminZone() && function_exists('drupal_multilingual') && drupal_multilingual()) {
         global $language;
         if ($language instanceof \stdClass) {
             $object = \XLite\Core\Database::getRepo('XLite\\Model\\Language')->findOneByCode($language->language);
             // DO NOT use "===" here
             if (isset($object) && \XLite\Model\Language::ENABLED == $object->getStatus()) {
                 $result = $object->getCode();
             }
         }
     }
     return isset($result) ? $result : parent::getCurrentLanguage();
 }
/**
 * Implements hook_preprocess_page().
 *
 * @see page.tpl.php
 */
function bootstrap_psdpt_preprocess_page(&$variables)
{
    global $base_url;
    // Internationalization Settings.
    global $language;
    $is_multilingual = 0;
    if (module_exists('i18n_menu') && drupal_multilingual()) {
        $is_multilingual = 1;
    }
    // WxT Settings.
    $theme_prefix = 'wb';
    $theme_menu_prefix = 'wet-fullhd';
    $wxt_active = variable_get('wetkit_wetboew_theme', 'wet-boew');
    $library_path = libraries_get_path($wxt_active, TRUE);
    $wxt_active = str_replace('-', '_', $wxt_active);
    $wxt_active = str_replace('wet_boew_', '', $wxt_active);
    // Extra variables to pass to templates.
    $variables['library_path'] = $library_path;
    $variables['language'] = $language->language;
    $variables['language_prefix'] = $language->prefix;
    $variables['language_prefix_alt'] = $language->prefix == 'en' ? 'fr' : 'fra';
    // Site Name.
    if (!empty($variables['site_name'])) {
        $variables['site_name_title'] = filter_xss(variable_get('site_name', 'Drupal'));
        $variables['site_name_unlinked'] = $variables['site_name_title'];
        $variables['site_name_url'] = url(variable_get('site_frontpage', 'node'));
        $variables['site_name'] = trim($variables['site_name_title']);
    }
    // Logo settings.
    $default_logo = theme_get_setting('default_logo');
    $default_svg_logo = theme_get_setting('wetkit_theme_svg_default_logo');
    $default_logo_path = $variables['logo'];
    $default_svg_logo_path = theme_get_setting('wetkit_theme_svg_logo_path');
    $toggle_logo = theme_get_setting('toggle_logo');
    $variables['logo_class'] = '';
    $variables['logo_svg'] = '';
    // Toggle Logo off/on.
    if ($toggle_logo == 0) {
        $variables['logo'] = '';
        $variables['logo_svg'] = '';
        $variables['logo_class'] = drupal_attributes(array('class' => 'no-logo'));
    }
    // Default Logo.
    if ($default_logo == 1) {
        $variables['logo'] = $library_path . '/assets/logo.png';
        $variables['logo_svg'] = $library_path . '/assets/logo.svg';
        // GCWeb or GC Intranet.
        if ($wxt_active == 'gcweb' || $wxt_active == 'gc_intranet') {
            $variables['logo'] = $library_path . '/assets/sig-blk-' . $language->language . '.png';
            $variables['logo_svg'] = $library_path . '/assets/sig-blk-' . $language->language . '.svg';
        } elseif ($wxt_active == 'gcwu_fegc') {
            $variables['logo'] = $library_path . '/assets/sig-' . $language->language . '.png';
            $variables['logo_svg'] = $library_path . '/assets/sig-' . $language->language . '.svg';
        }
    }
    // Custom Logo.
    if ($default_logo == 0) {
        if ($default_svg_logo == 1) {
            $variables['logo_svg'] = $base_url . '/' . $default_svg_logo_path;
        }
    }
    // Default GCWeb misc.
    if ($wxt_active == 'gcweb') {
        $variables['logo_bottom'] = $library_path . '/assets/wmms-blk' . '.png';
        $variables['logo_bottom_svg'] = $library_path . '/assets/wmms-blk' . '.svg';
    }
    // Add information about the number of sidebars.
    if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
        $variables['content_column_class'] = ' class="col-sm-6"';
    } elseif (!empty($variables['page']['sidebar_first']) || !empty($variables['page']['sidebar_second'])) {
        $variables['content_column_class'] = ' class="col-sm-9"';
    } else {
        $variables['content_column_class'] = '';
    }
    // Primary menu.
    $variables['primary_nav'] = FALSE;
    if ($variables['main_menu']) {
        // Build links.
        $variables['primary_nav'] = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
        // Provide default theme wrapper function.
        $variables['primary_nav']['#theme_wrappers'] = array('menu_tree__primary');
    }
    // Secondary nav.
    $variables['secondary_nav'] = FALSE;
    if ($variables['secondary_menu']) {
        // Build links.
        $variables['secondary_nav'] = menu_tree(variable_get('menu_secondary_links_source', 'user-menu'));
        // Provide default theme wrapper function.
        $variables['secondary_nav']['#theme_wrappers'] = array('menu_tree__secondary');
    }
    // Navbar.
    $variables['navbar_classes_array'] = array('');
    if (theme_get_setting('bootstrap_navbar_position') !== '') {
        $variables['navbar_classes_array'][] = 'navbar-' . theme_get_setting('bootstrap_navbar_position');
    } else {
        $variables['navbar_classes_array'][] = '';
    }
    // Mega Menu Region.
    /*  if (module_exists('menu_block') && empty($variables['mega_menu'])) {
        $menu_name = 'main_menu';
        $data = array(
          '#pre_render' => array('_wetkit_menu_tree_build_prerender'),
          '#cache' => array(
            'keys' => array('bootstrap_psdpt', 'menu', 'mega_menu', $menu_name),
            'expire' => CACHE_TEMPORARY,
            'granularity' => DRUPAL_CACHE_PER_ROLE
          ),
          '#menu_name' => $menu_name,
        );
        $variables['page']['mega_menu'] = $data;
      }*/
    // Splash Page.
    if (current_path() == 'splashify-splash') {
        // GCWeb Theme.
        if ($wxt_active == 'gcweb') {
            $variables['background'] = $library_path . '/img/splash/sp-bg-2.jpg';
        }
    }
    // Panels Integration.
    if (module_exists('page_manager')) {
        // Page template suggestions for Panels pages.
        $panel_page = page_manager_get_current_page();
        if (!empty($panel_page)) {
            // Add the active WxT theme machine name to the template suggestions.
            $suggestions[] = 'page__panels__' . $wxt_active;
            if (drupal_is_front_page()) {
                $suggestions[] = 'page__panels__' . $wxt_active . '__front';
            }
            // Add the panel page machine name to the template suggestions.
            $suggestions[] = 'page__' . $panel_page['name'];
            // Merge the suggestions in to the existing suggestions
            // (as more specific than the existing suggestions).
            $variables['theme_hook_suggestions'] = array_merge($variables['theme_hook_suggestions'], $suggestions);
            $variables['panels_layout'] = TRUE;
        } else {
            $suggestions[] = 'page__' . $wxt_active;
            // Splash Page.
            if (current_path() == 'splashify-splash') {
                $suggestions[] = 'page__splash__' . $wxt_active;
            }
            // Merge the suggestions in to the existing suggestions (as more specific
            // than the existing suggestions).
            $variables['theme_hook_suggestions'] = array_merge($variables['theme_hook_suggestions'], $suggestions);
        }
    }
    // Header Navigation + Language Switcher.
    $menu = $is_multilingual ? i18n_menu_navigation_links('menu-wet-header') : menu_navigation_links('menu-wet-header');
    $nav_bar_markup = theme('links__menu_menu_wet_header', array('links' => $menu, 'attributes' => array('id' => 'menu', 'class' => array('links', 'clearfix')), 'heading' => array('text' => 'Language Selection', 'level' => 'h2')));
    $nav_bar_markup = strip_tags($nav_bar_markup, '<h2><li><a>');
    if (module_exists('wetkit_language')) {
        $language_link_markup = '<li id="' . $theme_menu_prefix . '-lang">' . strip_tags($variables['menu_lang_bar'], '<a><span>') . '</li>';
        if ($wxt_active == 'gcweb') {
            $variables['menu_bar'] = '<ul class="list-inline margin-bottom-none">' . $language_link_markup . '</ul>';
        } else {
            if ($wxt_active == 'gcwu_fegc') {
                $variables['menu_bar'] = '<ul id="gc-bar" class="list-inline">' . preg_replace("/<h([1-6]{1})>.*?<\\/h\\1>/si", '', $nav_bar_markup) . $language_link_markup . '</ul>';
            } else {
                if ($wxt_active == 'gc_intranet') {
                    $variables['menu_bar'] = '<ul id="gc-bar" class="list-inline">' . $language_link_markup . '</ul>';
                } else {
                    $variables['menu_bar'] = '<ul class="text-right">' . preg_replace("/<h([1-6]{1})>.*?<\\/h\\1>/si", '', $nav_bar_markup) . $language_link_markup . '</ul>';
                }
            }
        }
    } else {
        $variables['menu_bar'] = '<ul class="text-right">' . preg_replace("/<h([1-6]{1})>.*?<\\/h\\1>/si", '', $nav_bar_markup) . '</ul>';
    }
    // Custom Search Box.
    if (module_exists('custom_search')) {
        $custom_search_form_name = 'custom_search_blocks_form_1';
        $custom_search = array('#pre_render' => array('__wetkit_custom_search_prerender'), '#cache' => array('keys' => array('bootstrap_psdpt', 'custom_search', $custom_search_form_name), 'expire' => CACHE_TEMPORARY, 'granularity' => DRUPAL_CACHE_PER_USER), '#custom_search_form_name' => $custom_search_form_name, '#wxt_active' => $wxt_active);
        $variables['custom_search'] = $custom_search;
        // CDN Support.
        if ($wxt_active == 'gcweb') {
            $gcweb_cdn = theme_get_setting('gcweb_cdn');
            if (!empty($gcweb_cdn)) {
                $variables['gcweb_cdn'] = TRUE;
            } else {
                $variables['gcweb_cdn'] = FALSE;
            }
        }
        // Visibility settings.
        $pages = drupal_strtolower(theme_get_setting('wetkit_search_box'));
        // Convert the Drupal path to lowercase.
        $path = drupal_strtolower(drupal_get_path_alias($_GET['q']));
        // Compare the lowercase internal and lowercase path alias (if any).
        $page_match = drupal_match_path($path, $pages);
        if ($path != $_GET['q']) {
            $page_match = $page_match || drupal_match_path($_GET['q'], $pages);
        }
        // When $visibility has a value of 0 (VISIBILITY_NOTLISTED),
        // the block is displayed on all pages except those listed in $pages.
        // When set to 1 (VISIBILITY_LISTED), it is displayed only on those
        // pages listed in $pages.
        $visibility = 0;
        $page_match = !(0 xor $page_match);
        if ($page_match) {
            $variables['search_box'] = render($variables['custom_search']);
            $variables['search_box'] = str_replace('type="text"', 'type="search"', $variables['search_box']);
        } else {
            $variables['search_box'] = '';
        }
    }
    // Terms Navigation.
    $menu = $is_multilingual ? i18n_menu_navigation_links('menu-wet-terms') : menu_navigation_links('menu-wet-terms');
    $class = $wxt_active == 'gcwu_fegc' || $wxt_active == 'gc_intranet' ? array('list-inline') : array('links', 'clearfix');
    $terms_bar_markup = theme('links__menu_menu_wet_terms', array('links' => $menu, 'attributes' => array('id' => 'gc-tctr', 'class' => $class), 'heading' => array()));
    $variables['page']['menu_terms_bar'] = $terms_bar_markup;
    // Mid Footer Region.
    if (module_exists('menu_block')) {
        $menu_name = 'mid_footer_menu';
        $data = array('#pre_render' => array('_wetkit_menu_tree_build_prerender'), '#cache' => array('keys' => array('bootstrap_psdpt', 'menu', 'footer', $menu_name), 'expire' => CACHE_TEMPORARY, 'granularity' => DRUPAL_CACHE_PER_ROLE), '#menu_name' => $menu_name);
        $variables['page']['footer']['minipanel'] = $data;
    }
    // Unset powered by block.
    unset($variables['page']['footer']['system_powered-by']);
    // Footer Navigation.
    $menu = $is_multilingual ? i18n_menu_navigation_links('menu-wet-footer') : menu_navigation_links('menu-wet-footer');
    $class = $wxt_active == 'gcwu_fegc' || $wxt_active == 'gc_intranet' ? array('list-inline') : array('links', 'clearfix');
    $footer_bar_markup = theme('links__menu_menu_wet_footer', array('links' => $menu, 'attributes' => array('id' => 'menu', 'class' => $class), 'heading' => array()));
    $variables['page']['menu_footer_bar'] = $footer_bar_markup;
    // Footer Navigation (gcweb).
    if ($wxt_active == 'gcweb') {
        $variables['gcweb'] = array('feedback' => array('en' => 'http://www.canada.ca/en/contact/feedback.html', 'fr' => 'http://www.canada.ca/fr/contact/retroaction.html'), 'social' => array('en' => 'http://www.canada.ca/en/social/index.html', 'fr' => 'http://www.canada.ca/fr/sociaux/index.html'), 'mobile' => array('en' => 'http://www.canada.ca/en/mobile/index.html', 'fr' => 'http://www.canada.ca/fr/mobile/index.html'));
    }
}
示例#5
0
/**
 * Loads the requested module and executes the requested callback.
 *
 * @return
 *   The callback function's return value or one of the JS_* constants.
 */
function js_execute_callback()
{
    $args = explode('/', $_GET['q']);
    // If i18n is enabled and therefore the js module should boot
    // to DRUPAL_BOOTSTRAP_LANGUAGE.
    $i18n = FALSE;
    // Validate if there is a language prefix in the path.
    if (!empty($args[0]) && !empty($args[1]) && $args[1] == 'js_callback') {
        // Language string detected, strip off the language code.
        $language_code = array_shift($args);
        // Enable language detection to make sure i18n is enabled.
        $i18n = TRUE;
    }
    // Strip first argument 'js_callback'.
    if (!empty($args[0]) && $args[0] == 'js_callback') {
        array_shift($args);
    }
    // Determine module to load.
    $module = check_plain(array_shift($args));
    if (!$module || !drupal_load('module', $module)) {
        return JS_MENU_ACCESS_DENIED;
    }
    // Get info hook function name.
    $function = $module . '_js';
    if (!function_exists($function)) {
        return JS_MENU_NOT_FOUND;
    }
    // Get valid callbacks.
    $valid_callbacks = $function();
    // Get the callback.
    $callback = check_plain(array_shift($args));
    // Validate the callback.
    if (!isset($valid_callbacks[$callback])) {
        return JS_MENU_NOT_FOUND;
    }
    // If the callback function is located in another file, load that file now.
    if (isset($valid_callbacks[$callback]['file']) && ($filepath = drupal_get_path('module', $module) . '/' . $valid_callbacks[$callback]['file']) && file_exists($filepath)) {
        require_once $filepath;
    }
    // Validate the existance of the defined callback.
    if (!function_exists($valid_callbacks[$callback]['callback'])) {
        return JS_MENU_NOT_FOUND;
    }
    // Bootstrap to required level.
    $full_boostrap = FALSE;
    if (!empty($valid_callbacks[$callback]['bootstrap'])) {
        drupal_bootstrap($valid_callbacks[$callback]['bootstrap']);
        $full_boostrap = $valid_callbacks[$callback]['bootstrap'] == DRUPAL_BOOTSTRAP_FULL;
    }
    // Validate if the callback uses i18n.
    if (isset($valid_callbacks[$callback]['i18n'])) {
        $i18n = $valid_callbacks[$callback]['i18n'];
    }
    if (!$full_boostrap) {
        // The following mimics the behavior of _drupal_bootstrap_full().
        // The difference is that not all modules and includes are loaded.
        // @see _drupal_bootstrap_full().
        // If i18n is enabled, boot to the language phase and make
        // sure the required modules are enabled.
        if ($i18n) {
            // First boot to the variables to make sure drupal_multilingual() works.
            drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
            // As the variables bootstrap phase loads all core modules, we have to
            // add the user module and the path include as a dependencies because they
            // are required by some core modules.
            if (empty($valid_callbacks[$callback]['dependencies'])) {
                $valid_callbacks[$callback]['dependencies'] = array();
            }
            if (empty($valid_callbacks[$callback]['includes'])) {
                $valid_callbacks[$callback]['includes'] = array();
            }
            if (!in_array('user', $valid_callbacks[$callback]['dependencies'])) {
                $valid_callbacks[$callback]['dependencies'][] = 'user';
            }
            if (!in_array('path', $valid_callbacks[$callback]['includes'])) {
                $valid_callbacks[$callback]['includes'][] = 'path';
            }
            // Then check if it's a multilingual site. If so, boot to the language
            // phase.
            if (drupal_multilingual()) {
                drupal_bootstrap(DRUPAL_BOOTSTRAP_LANGUAGE);
            }
        }
        // Load required include files based on the callback.
        if (isset($valid_callbacks[$callback]['includes']) && is_array($valid_callbacks[$callback]['includes'])) {
            foreach ($valid_callbacks[$callback]['includes'] as $include) {
                if (file_exists("./includes/{$include}.inc")) {
                    require_once "./includes/{$include}.inc";
                }
            }
        }
        // Detect string handling method.
        unicode_check();
        // Undo magic quotes.
        fix_gpc_magic();
        // Make sure all stream wrappers are registered.
        file_get_stream_wrappers();
        // Load required modules.
        $modules = array($module => 0);
        if (isset($valid_callbacks[$callback]['dependencies']) && is_array($valid_callbacks[$callback]['dependencies'])) {
            foreach ($valid_callbacks[$callback]['dependencies'] as $dependency) {
                if (!drupal_load('module', $dependency)) {
                    // Do a boot up till SESSION to be sure the drupal_set_message()
                    // function works.
                    drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
                    // Create an error message with information for the user to be able
                    // to fix the dependency.
                    $error = t('The dependency :dependency for the callback :callback in :module is not installed.', array(':dependency' => $dependency, ':callback' => $callback, ':module' => $module));
                    // Let the user know what's wrong and throw an exception to stop the
                    // callback.
                    drupal_set_message($error, 'error');
                    throw new Exception($error);
                }
                $modules[$dependency] = 0;
            }
        }
        // Reset module list.
        module_list(FALSE, TRUE, FALSE, $modules);
        // Ensure the language variable is set, if not it might cause problems (e.g.
        // entity info).
        global $language;
        if (!isset($language)) {
            $language = language_default();
        }
        // If access arguments are passed, boot to SESSION and validate if the user
        // has access to this callback.
        if (!empty($valid_callbacks[$callback]['access arguments']) || !empty($valid_callbacks[$callback]['access callback'])) {
            drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
            // If no callback is provided, default to user_access.
            if (!isset($valid_callbacks[$callback]['access callback'])) {
                $valid_callbacks[$callback]['access callback'] = 'user_access';
            }
            if ($valid_callbacks[$callback]['access callback'] == 'user_access') {
                // Ensure the user module is available.
                drupal_load('module', 'user');
            }
            if (!call_user_func_array($valid_callbacks[$callback]['access callback'], !empty($valid_callbacks[$callback]['access arguments']) ? $valid_callbacks[$callback]['access arguments'] : array())) {
                return JS_MENU_ACCESS_DENIED;
            }
        }
        // Invoke implementations of hook_init() if the callback doesn't indicate it
        // should be skipped.
        if (!isset($valid_callbacks[$callback]['skip_hook_init']) || $valid_callbacks[$callback]['skip_hook_init'] == FALSE) {
            module_invoke_all('init');
        }
    }
    // If there are page arguments defined add them to the callback call.
    if (isset($valid_callbacks[$callback]['page arguments'])) {
        // Get the original args again and strip first arguments 'js_callback' and 'module'.
        $args = array_slice(explode('/', $_GET['q']), 2);
        // Overwrite the arguments
        $args = array_intersect_key($args, array_flip($valid_callbacks[$callback]['page arguments']));
    }
    // Invoke callback function.
    return call_user_func_array($valid_callbacks[$callback]['callback'], $args);
}
示例#6
0
 /**
  * Create an uri for an entity.
  *
  * @param $entity
  *   The entity to get the path from.
  *
  * @return
  *   A string containing the path of the entity, NULL if the entity has no
  *   uri of its own.
  */
 function createPath($entity)
 {
     // Create the URI for the entity.
     $uri = entity_uri($this->plugin['entity_type'], $entity);
     $options = array();
     // Handle multilingual sites.
     if (isset($entity->language) && $entity->language != LANGUAGE_NONE && drupal_multilingual() && language_negotiation_get_any(LOCALE_LANGUAGE_NEGOTIATION_URL)) {
         $languages = language_list('enabled');
         // Only use enabled languages.
         $languages = $languages[1];
         if ($languages && isset($languages[$entity->language])) {
             $options['language'] = $languages[$entity->language];
         }
     }
     // Process the uri with the insert pluing.
     $path = linkit_get_insert_plugin_processed_path($this->profile, $uri['path'], $options);
     return $path;
 }
示例#7
0
function argoitia_preprocess_page(&$variables)
{
    // Add information about the number of sidebars.
    if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
        $variables['content_column_class'] = ' class="col-sm-6"';
    } elseif (!empty($variables['page']['sidebar_first']) || !empty($variables['page']['sidebar_second'])) {
        $variables['content_column_class'] = ' class="col-sm-9"';
    } else {
        $variables['content_column_class'] = ' class="col-sm-12"';
    }
    // Primary nav.
    $variables['primary_nav'] = FALSE;
    if ($variables['main_menu']) {
        // Build links.
        $variables['primary_nav'] = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
        // Provide default theme wrapper function.
        $variables['primary_nav']['#theme_wrappers'] = array('menu_tree__primary');
    }
    // Secondary nav.
    $variables['secondary_nav'] = FALSE;
    if ($variables['secondary_menu']) {
        // Build links.
        $variables['secondary_nav'] = menu_tree(variable_get('menu_secondary_links_source', 'user-menu'));
        // Provide default theme wrapper function.
        $variables['secondary_nav']['#theme_wrappers'] = array('menu_tree__secondary');
    }
    // Language nav
    if (drupal_multilingual()) {
        $variables['language_links'] = _argoitia_language_list_2();
    }
    $variables['navbar_classes_array'] = array('navbar');
    if (theme_get_setting('bootstrap_navbar_position') !== '') {
        $variables['navbar_classes_array'][] = 'navbar-' . theme_get_setting('bootstrap_navbar_position');
    } else {
        $variables['navbar_classes_array'][] = 'container-fluid';
    }
    if (theme_get_setting('bootstrap_navbar_inverse')) {
        $variables['navbar_classes_array'][] = 'navbar-inverse';
    } else {
        $variables['navbar_classes_array'][] = 'navbar-default';
    }
    // Revolution Slider
    if ($variables['is_front']) {
        // JS at footer for front page
        $options = array('group' => JS_THEME, 'scope' => 'footer');
        drupal_add_js(path_to_theme() . '/js/slider-revolution/js/jquery.themepunch.plugins.min.js', $options);
        drupal_add_js(path_to_theme() . '/js/slider-revolution/js/jquery.themepunch.revolution.min.js', $options);
    }
    // Page Suggestions
    if (isset($variables['node'])) {
        $suggest = 'page__' . str_replace('_', '--', $variables['node']->type);
        $variables['theme_hook_suggestions'][] = $suggest;
    }
    /**
     * Add Javascript for enable/disable Isotope Javascript.
     */
    //if (theme_get_setting('isotope_js_include', 'argoitia')) {
    drupal_add_js(drupal_get_path('theme', 'argoitia') . '/js/isotope/jquery.isotope.js', array('preprocess' => false));
    drupal_add_js(drupal_get_path('theme', 'argoitia') . '/js/jquery.ba-bbq.min.js', array('preprocess' => false));
    drupal_add_css(drupal_get_path('theme', 'argoitia') . '/js/isotope/jquery.isotope.css');
    $all = t('All');
    drupal_add_js('
		jQuery(document).ready(function($) {

	    $(window).load(function() {

        $(".filters").fadeIn("slow");
        $(".filter-items").fadeIn("slow");
        var container = $(".filter-items"),
        filters= $(".filters");

        container.isotope({
            itemSelector: ".isotope-item",
            layoutMode : "sloppyMasonry",
            filter: "*"
        });

		$(".filters").prepend( "<li class=\\"active\\"><a href=\\"#filter=*\\">' . $all . '</a></li>" );

		filters.find("a").click(function(){

			var href = $(this).attr("href").replace( /^#/, "" ),
			option = $.deparam( href, true );

            filters.find("li.active").removeClass("active");
            $(this).parent().addClass("active");

			$.bbq.pushState( option );
			return false;
		});

		$(window).bind( "hashchange", function( event ){

			var hashOptions = $.deparam.fragment();

			container.isotope( hashOptions );
		}).trigger("hashchange");
	    
	    });

		});', array('type' => 'inline', 'scope' => 'footer', 'weight' => 2));
    //}
    //EOF:Javascript
}