/** * Preprocessor for theme('page'). */ function rubik_preprocess_page(&$vars) { // Show a warning if base theme is not present. if (!function_exists('tao_theme') && user_access('administer site configuration')) { drupal_set_message(t('The Rubik theme requires the !tao base theme in order to work properly.', array('!tao' => l('Tao', 'http://code.developmentseed.org/tao'))), 'warning'); } // Set a page icon class. $vars['page_icon_class'] = ($item = menu_get_item()) ? implode(' ', _rubik_icon_classes($item['href'])) : ''; // Help pages. They really do need help. if (strpos($_GET['q'], 'admin/help/') === 0 && isset($vars['page']['content']['system_main']['main']['#markup'])) { $vars['page']['content']['system_main']['main']['#markup'] = theme('help_page', array('content' => $vars['page']['content']['system_main']['main']['#markup'])); } // Clear out help text if empty. if (empty($vars['help']) || !strip_tags($vars['help'])) { $vars['help'] = ''; } // Process local tasks. Only do this processing if the current theme is // indeed Rubik. Subthemes must reimplement this call. global $theme; if ($theme === 'rubik') { _rubik_local_tasks($vars); } // Overlay is enabled. $vars['overlay'] = module_exists('overlay') && overlay_get_mode() === 'child'; }
/** * Preprocessor for theme('page'). */ function wetkit_rubik_preprocess_page(&$vars) { // Process local tasks. Only do this processing if the current theme is // indeed Rubik. Subthemes must reimplement this call. global $theme; // Custom Logic Based on Theme Selection (Internet, Intranet or Base) if (variable_get('wetkit_wetboew_theme', 0) == 2) { $theme_prefix = 'base'; } else { $theme_prefix = 'gcwu'; } if (module_exists('wetkit_language')) { $language_link_markup = '<li id="' . $theme_prefix . '-gcnb-lang">' . strip_tags($vars['menu_lang_bar'], '<a><span>') . '</li>'; $vars['menu_bar'] = '<ul class="links secondary-menu">' . $language_link_markup . '</ul>'; } if ($theme === 'wetkit_rubik') { _rubik_local_tasks($vars); } // Add body class when we have local tasks. // Since we don't have access to body classes here // set a flag for preprocess_html(). if (!empty($vars['primary_local_tasks'])) { _wetkit_rubik_has_tabs(TRUE); } // Set a page icon for dashboard links. if (empty($vars['page_icon_class'])) { $vars['page_icon_class'] = ($item = menu_get_item()) ? implode(' ', _wetkit_rubik_icon_classes($item['href'])) : ''; } }
/** * Preprocessor for theme('page'). */ function fubik_preprocess_page(&$vars) { // Process local tasks. Only do this processing if the current theme is // indeed Rubik. Subthemes must reimplement this call. global $theme; if ($theme === 'fubik') { _rubik_local_tasks($vars); } // Add body class when we have local tasks. // Since we don't have access to body classes here // set a flag for preprocess_html(). if (!empty($vars['primary_local_tasks'])) { _fubik_has_tabs(TRUE); } // Set a page icon for dashboard links. if (empty($vars['page_icon_class'])) { $vars['page_icon_class'] = ($item = menu_get_item()) ? implode(' ', _fubik_icon_classes($item['href'])) : ''; } }
/** * Preprocessor for theme('page'). */ function rubik_preprocess_page(&$vars) { // Show a warning if base theme is not present. if (!function_exists('tao_theme') && user_access('administer site configuration')) { drupal_set_message(t('The Rubik theme requires the !tao base theme in order to work properly.', array('!tao' => l('Tao', 'http://drupal.org/project/tao'))), 'warning'); } // Set a page icon class. $vars['page_icon_class'] = ($item = menu_get_item()) ? implode(' ', _rubik_icon_classes($item['href'])) : ''; // Help pages. They really do need help. if (strpos($_GET['q'], 'admin/help/') === 0 && isset($vars['page']['content']['system_main']['main']['#markup'])) { $vars['page']['content']['system_main']['main']['#markup'] = theme('help_page', array('content' => $vars['page']['content']['system_main']['main']['#markup'])); } // Clear out help text if empty. if (empty($vars['help']) || !strip_tags($vars['help'])) { $vars['help'] = ''; } // Process local tasks. This will get called for rubik and its subthemes. _rubik_local_tasks($vars); // Overlay is enabled. $vars['overlay'] = module_exists('overlay') && overlay_get_mode() === 'child'; // Disable sticky in the sidebar. Set option in JS $disable_sticky = theme_get_setting('rubik_disable_sticky_sidebar'); drupal_add_js(array('rubik' => array('disable_sticky' => $disable_sticky)), array('type' => 'setting')); }