domain_theme_init

Versions
domain
domain_theme_init()

Implement hook_init()

Code

domain_theme/domain_theme.module, line 21

<?php
function domain_theme_init() {
  // Assign the theme selected, based on the active domain.
  global $_domain, $custom_theme;
  // If the theme has already been set (such as an admin theme), only load settings.
  if (empty($custom_theme)) {
    $theme = domain_theme_lookup($_domain['domain_id']);
  }
  else {
    $theme = domain_theme_lookup($_domain['domain_id'], $custom_theme);
  }
  // The above returns -1 on failure.
  if ($theme != -1) {
    // Set our domain-specific theme.
    if (empty($custom_theme)) {
      $custom_theme = $theme['theme'];
    }
    domain_theme_set_variables($theme);
  }
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List