You are here

function content_profile_theme_registry_alter in Content Profile 6

Implementation of hook_theme_registry_alter(). Adds our own preprocess functions to some templates. Further templates can be set in $conf['content_profile_extra_templates'] in settings.php.

File

./content_profile.module, line 623

Code

function content_profile_theme_registry_alter(&$items) {
  $templates = array_merge(array(
    'author_pane',
    'comment',
    'node',
    'page',
    'search_result',
    'username',
    'user_profile',
    'user_signature',
  ), variable_get('content_profile_extra_templates', array()));
  foreach ($templates as $key) {
    if (isset($items[$key])) {
      $items[$key] += array(
        'preprocess functions' => array(),
      );
      $items[$key]['preprocess functions'][] = 'content_profile_template_preprocess';
    }
  }
}