custom _phptemplate_variables()

  1. // Modified by Michelle (custom)
  2. function _phptemplate_variables($hook, $vars) {
  3.  if (module_exists('advanced_profile')) {
  4.    $vars = advanced_profile_addvars($hook, $vars);
  5.  }
  6.  
  7.  if ($hook == 'page') {
  8.    // Set all tabs on the user page to have the email address as the title
  9.    if (arg(0) == 'user') {
  10.      $uid = arg(1);
  11.      $account = user_load(array('uid' => $uid));
  12.      $vars['title'] = strip_tags($account->mail);
  13.    }
  14.  
  15.    if ($secondary = menu_secondary_local_tasks()) {
  16.      $output = '<span class="clear"></span>';
  17.      $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
  18.      $vars['tabs2'] = $output;
  19.    }
  20.  
  21.    // Hook into color.module
  22.    if (module_exists('color')) {
  23.      _color_page_alter($vars);
  24.    }
  25.    return $vars;
  26.  }
  27.  return $vars;
  28. }