You are here

function mcd_theme_registry_alter in Maintenance Countdown 7

Same name and namespace in other branches
  1. 6 mcd.countdown.inc \mcd_theme_registry_alter()

Implements of hook_theme_registry_alter().

Make drupal to use this maintenance-countdown-page.tpl.php in maintenance mode if timer is set

Parameters

$theme_registry: The entire cache of theme registry information, post-processing.

File

./mcd.countdown.inc, line 17
This file provides theme part of MCD module

Code

function mcd_theme_registry_alter(&$theme_registry) {

  // If site doing process like install or update don't use this template
  if (isset($theme_registry['maintenance_page']) && !defined('MAINTENANCE_MODE')) {
    $theme_registry['maintenance_page']['path'] = drupal_get_path('module', 'mcd');
    $theme_registry['maintenance_page']['template'] = 'maintenance-countdown-page';
    $theme_registry['maintenance_page']['type'] = 'theme';
  }
}