function realname_theme_registry_alter in Real Name 6
An Implements hook_theme_registry_alter()
Swap in our own replacement for theme_username(), allowing the site admin to configure the string on a per-nodetype basis.
File
- ./
realname.module, line 348
Code
function realname_theme_registry_alter(&$theme_registry) {
if (!empty($theme_registry['form_element'])) {
$path = drupal_get_path('module', 'realname');
if (variable_get('realname_theme', TRUE)) {
$theme_registry['username']['function'] = 'realname_username';
$theme_registry['username']['file'] = $path . '/realname_theme.inc';
$theme_registry['username']['theme path'] = $path;
$theme_registry['username']['theme paths'][0] = $path;
}
$theme_registry['user_admin_new_role']['function'] = 'theme_realname_new_role';
$theme_registry['user_admin_new_role']['file'] = $path . '/realname_theme.inc';
$theme_registry['user_admin_new_role']['theme path'] = $path;
$theme_registry['user_admin_new_role']['theme paths'][0] = $path;
}
}