/** * 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'); } // Split page content & content blocks. $vars['content_region'] = theme('blocks_content', TRUE); // Set a page icon class. $vars['page_icon_class'] = ($item = menu_get_item()) ? _rubik_icon_classes($item['href']) : ''; // Add body class for theme. $vars['attr']['class'] .= ' rubik'; // Body class for admin module. $vars['attr']['class'] .= ' admin-static'; // Help pages. They really do need help. if (strpos($_GET['q'], 'admin/help/') === 0) { $vars['content'] = theme('help_page', $vars['content']); } // Display user account links. $vars['user_links'] = _rubik_user_links(); // Help text toggler link. $vars['help_toggler'] = l(t('Help'), $_GET['q'], array('attributes' => array('id' => 'help-toggler', 'class' => 'toggler'), 'fragment' => 'help-text')); // Clear out help text if empty. if (empty($vars['help']) || !strip_tags($vars['help'])) { $vars['help'] = ''; } }
/** * Preprocessor for theme('page'). */ function rubik_preprocess_page(&$vars) { // Set a page icon class. $vars['page_icon_class'] = ($item = menu_get_item()) ? _rubik_icon_classes($item['href']) : ''; // Add body class for theme. $vars['attr']['class'] .= ' rubik'; // Body class for admin module. $vars['attr']['class'] .= ' admin-static'; // Help pages. They really do need help. if (strpos($_GET['q'], 'admin/help/') === 0) { $vars['content'] = theme('help_page', $vars['content']); } // Display user account links. $vars['user_links'] = _rubik_user_links(); // Help text toggler link. $vars['help_toggler'] = l(t('Help'), $_GET['q'], array('attributes' => array('id' => 'help-toggler', 'class' => 'toggler'), 'fragment' => 'rubik-help=1')); // Clear out help text if empty. if (empty($vars['help']) || !strip_tags($vars['help'])) { $vars['help'] = ''; } }