You are here

function regions_theme_registry_alter in Regions 6

Implementation of hook_theme_registry_alter().

File

./regions.module, line 189
Add regions to the screen that are cross-theme compliant

Code

function regions_theme_registry_alter(&$theme_registry) {

  // Remove any existing instances of our pre page preprocessor.
  $position = array_search('regions_preprocess_pre_page', $theme_registry['page']['preprocess functions']);
  if ($position !== FALSE) {
    unset($theme_registry['page']['preprocess functions'][$position]);
  }

  // Add an additional page preprocess function prior to template_preprocess_page()
  $position = array_search('template_preprocess_page', $theme_registry['page']['preprocess functions']);
  if ($position !== FALSE) {
    array_splice($theme_registry['page']['preprocess functions'], $position, 0, 'regions_preprocess_pre_page');
  }
}