You are here

function spaces_preprocess_page in Spaces 6.2

Same name and namespace in other branches
  1. 6.3 spaces.module \spaces_preprocess_page()
  2. 6 spaces.module \spaces_preprocess_page()
  3. 7.3 spaces.module \spaces_preprocess_page()
  4. 7 spaces.module \spaces_preprocess_page()

theme_page() preprocessor.

File

./spaces.module, line 1440

Code

function spaces_preprocess_page(&$vars) {
  if (variable_get('menu_primary_links_source', 'primary-links') === 'features' && !empty($vars['primary_links'])) {
    spaces_features_menu_links_alter($vars['primary_links']);
  }
  $space = spaces_get_space();
  if ($space) {
    if ($links = spaces_admin_links()) {
      $vars['space_admin_links'] = theme('links', $links);
    }
    if ($links = spaces_user_links()) {
      $vars['space_user_links'] = theme('links', $links);
    }
    if (!empty($space->title)) {
      $vars['space_title'] = l($space->title, '<front>');
    }
    $vars['body_classes'] .= " spaces-{$space->type}";
  }
}