You are here

function admin_theme_registry_alter in Admin 6.2

Same name and namespace in other branches
  1. 6 admin.module \admin_theme_registry_alter()

Implementation of hook_theme_registry_alter().

File

./admin.module, line 295

Code

function admin_theme_registry_alter(&$theme_registry) {

  // Remove any existing instances of our pre page preprocessor.
  $position = array_search('admin_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()
  // so that our blocks can include JS files as needed.
  $position = array_search('template_preprocess_page', $theme_registry['page']['preprocess functions']);
  if ($position !== FALSE) {
    array_splice($theme_registry['page']['preprocess functions'], $position, 0, 'admin_preprocess_pre_page');
  }
}