You are here

function domain_initial_domain in Domain Access 7.2

Same name and namespace in other branches
  1. 6.2 domain.module \domain_initial_domain()
  2. 7.3 domain.module \domain_initial_domain()

Store the initially loaded domain, for later use.

Parameters

$domain: The domain global value. This should only be called once.

Return value

$initial A copy of the initial $_domain global value.

See also

domain_init()

3 calls to domain_initial_domain()
domain_form_alter in ./domain.module
Implements hook_form_alter()
domain_init in ./domain.module
Implements hook_init().
domain_reset_domain in ./domain.module
Reset the active domain to its initial version.

File

./domain.module, line 137
Core module functions for the Domain Access suite.

Code

function domain_initial_domain($domain = array()) {
  static $initial;
  if (!isset($initial) && !empty($domain)) {
    $initial = $domain;
  }
  return $initial;
}