You are here

function domain_alias_domainnav in Domain Access 6.2

Same name and namespace in other branches
  1. 7.2 domain_alias/domain_alias.module \domain_alias_domainnav()

Implement hook_domainnav().

Ensure that active domains are correctly marked as active.

File

domain_alias/domain_alias.module, line 367
Interface for advanced domain matching for Domain Access.

Code

function domain_alias_domainnav($domain) {
  global $_domain;
  $extra = array();
  if (isset($_domain['active_alias_id'])) {
    $alias_id = $_domain['active_alias_id'];
    if (in_array($alias_id, array_keys($domain['aliases']))) {
      $extra['active'] = TRUE;
    }
  }
  return $extra;
}