function domain_cron in Domain Access 6.2
Same name and namespace in other branches
- 5 domain.module \domain_cron()
- 7.3 domain.module \domain_cron()
- 7.2 domain.module \domain_cron()
Implement hook_cron()
This function invokes hook_domaincron() and allows Domain Access modules to run functions for all active affiliates.
File
- ./
domain.module, line 743 - Core module functions for the Domain Access suite.
Code
function domain_cron() {
global $_domain;
// Check to see if this function is needed at all.
$modules = module_implements('domaincron');
if (!empty($modules)) {
// Get the domain list.
$domains = domain_domains();
// Run the hook for each active domain.
foreach ($domains as $domain) {
domain_set_domain($domain['domain_id'], TRUE);
foreach ($modules as $module) {
module_invoke($module, 'domaincron', $domain);
}
}
// Reset the active domain.
domain_reset_domain(TRUE);
}
}