/** * Implements template_preprocess_toolbar() * Put the node tabs and local actions into the top admin toolbar area */ function frame_preprocess_toolbar(&$vars) { $vars['toolbar']['toolbar_drawer'][0]['menu_local_tabs'] = menu_local_tabs(); $vars['toolbar']['toolbar_drawer'][0]['menu_local_tabs']['#primary'][] = menu_local_actions(); }
function aurora_preprocess_block(&$vars) { // Logo Block if ($vars['block']->delta == 'blockify-logo') { $vars['theme_hook_suggestions'][] = 'block__logo'; $site_name = filter_xss_admin(variable_get('site_name', 'Drupal')); // Strip the base_path from the beginning of the logo path. $path = preg_replace('|^' . base_path() . '|', '', theme_get_setting('logo')); $image = array('#theme' => 'image', '#path' => $path, '#alt' => t('!site_name Logo', array('!site_name' => $site_name))); $vars['logo'] = $image; $vars['sitename'] = $site_name; $vars['sitepath'] = url('<front>'); } else { if ($vars['block']->delta == 'blockify-site-name') { $vars['theme_hook_suggestions'][] = 'block__site_name'; $site_name = filter_xss_admin(variable_get('site_name', 'Drupal')); $vars['sitename'] = $site_name; $vars['sitepath'] = url('<front>'); } else { if ($vars['block']->delta == 'blockify-site-slogan') { $vars['theme_hook_suggestions'][] = 'block__site_slogan'; $slogan = filter_xss_admin(variable_get('site_slogan', 'Drupal')); $vars['slogan'] = $slogan; } else { if ($vars['block']->delta == 'blockify-page-title') { $vars['theme_hook_suggestions'][] = 'block__page_title'; $vars['page_title'] = drupal_get_title(); // Add this for legacy support. Should not be used in the template. #2370653 $vars['title'] = $vars['page_title']; } else { if ($vars['block']->delta == 'blockify-messages') { $vars['theme_hook_suggestions'][] = 'block__messages'; } else { if ($vars['block']->delta == 'blockify-breadcrumb') { $vars['theme_hook_suggestions'][] = 'block__breadcrumbs'; $breadcrumbs = drupal_get_breadcrumb(); $vars['breadcrumbs'] = theme('breadcrumb', array('breadcrumb' => $breadcrumbs)); } else { if ($vars['block']->delta == 'blockify-tabs') { $vars['theme_hook_suggestions'][] = 'block__tabs'; $primary = menu_primary_local_tasks(); $secondary = menu_secondary_local_tasks(); $tabs = array('primary' => $primary, 'secondary' => $secondary); $tabs = theme('menu_local_tasks', $tabs); $vars['tabs'] = $tabs; } else { if ($vars['block']->delta == 'blockify-actions') { $vars['theme_hook_suggestions'][] = 'block__actions'; $actions = menu_local_actions(); $vars['actions'] = $actions; } else { if ($vars['block']->delta == 'blockify-feed-icons') { $vars['theme_hook_suggestions'][] = 'block__feed_icons'; $icons = drupal_get_feeds(); $vars['icons'] = $icons; } } } } } } } } } }