You are here

function social_event_invite_theme_registry_alter in Open Social 8.9

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_event/modules/social_event_invite/social_event_invite.module \social_event_invite_theme_registry_alter()
  2. 10.0.x modules/social_features/social_event/modules/social_event_invite/social_event_invite.module \social_event_invite_theme_registry_alter()
  3. 10.1.x modules/social_features/social_event/modules/social_event_invite/social_event_invite.module \social_event_invite_theme_registry_alter()
  4. 10.2.x modules/social_features/social_event/modules/social_event_invite/social_event_invite.module \social_event_invite_theme_registry_alter()

Implements hook_theme_registry_alter().

File

modules/social_features/social_event/modules/social_event_invite/social_event_invite.module, line 180
The Social event invite enroll module.

Code

function social_event_invite_theme_registry_alter(&$theme_registry) {

  // Unfortunately the preprocess functions aren't ordered by module weight.
  // Changing module weight doesn't work, also with dependency set to
  // social_group this should be dealt with but isnt.
  // So we enforce our preprocess after social_group.
  if (!empty($theme_registry['views_view']['preprocess functions'])) {
    $current_key = array_search('social_event_invite_preprocess_views_view', $theme_registry['views_view']['preprocess functions'], FALSE);
    unset($theme_registry['views_view']['preprocess functions'][$current_key]);

    // Give it a new key all the way at the end.
    $theme_registry['views_view']['preprocess functions'][] = 'social_event_invite_preprocess_views_view';
  }
}