domain_cron

Versions
domain
domain_cron()

Implement hook_cron()

This function invokes hook_domaincron() and allows Domain Access modules to run functions for all active affiliates.

Code

./domain.module, line 577

<?php
function domain_cron() {
  global $_domain;
  // Check to see if this function is needed at all.
  $modules = module_implements('domaincron');
  if (!empty($modules)) {
    // Store the current $_domain global.
    $_temp = $_domain;
    // 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);
      }
    }
    // Set the $_domain global back.
    $_domain = $_temp;
  }
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List