function arrange_fields_theme_registry_alter in Arrange Fields 6
Theme registry alter hook
Register this module's path as a search location for tpl files. We want it to look for the special popup page.tpl files in the module's directory. Doing this allows us to include template files with the module which can still be overridden by the end user in their site's theme.
File
- ./
arrange_fields.module, line 1405
Code
function arrange_fields_theme_registry_alter(&$theme_registry) {
if (is_array($theme_registry['page'])) {
// store a reference to the first theme path entry (normally this should be 'modules/system')
$first_path = array_shift($theme_registry['page']['theme paths']);
// get the path to our module's page template files
$template_path = drupal_get_path('module', 'arrange_fields');
// now change the array to have the first entry first, then our template path, and then any other theme paths
array_unshift($theme_registry['page']['theme paths'], $first_path, $template_path);
}
}