function domain_source_domain_source_alter in Domain Access 7.3
Same name and namespace in other branches
- 6.2 domain_source/domain_source.module \domain_source_domain_source_alter()
- 7.2 domain_source/domain_source.module \domain_source_domain_source_alter()
Implements hook_domain_source_alter().
File
- domain_source/
domain_source.domain.inc, line 13 - Domain hooks for Domain Source.
Code
function domain_source_domain_source_alter(&$source, $nid) {
$source_id = domain_source_lookup($nid);
// If FALSE returned, no source is defined.
if (!$source_id) {
return;
}
// DOMAIN_SOURCE_USE_ACTIVE is the status for 'Use active domain.'
if ($source_id == DOMAIN_SOURCE_USE_ACTIVE) {
$source = domain_get_domain();
}
else {
$source = domain_lookup($source_id);
}
}