You are here

function social_path_manager_social_path_manager_group_tabs_alter in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/custom/social_path_manager/social_path_manager.module \social_path_manager_social_path_manager_group_tabs_alter()
  2. 8.5 modules/custom/social_path_manager/social_path_manager.module \social_path_manager_social_path_manager_group_tabs_alter()
  3. 8.6 modules/custom/social_path_manager/social_path_manager.module \social_path_manager_social_path_manager_group_tabs_alter()
  4. 8.8 modules/custom/social_path_manager/social_path_manager.module \social_path_manager_social_path_manager_group_tabs_alter()
  5. 10.3.x modules/custom/social_path_manager/social_path_manager.module \social_path_manager_social_path_manager_group_tabs_alter()
  6. 10.0.x modules/custom/social_path_manager/social_path_manager.module \social_path_manager_social_path_manager_group_tabs_alter()
  7. 10.1.x modules/custom/social_path_manager/social_path_manager.module \social_path_manager_social_path_manager_group_tabs_alter()
  8. 10.2.x modules/custom/social_path_manager/social_path_manager.module \social_path_manager_social_path_manager_group_tabs_alter()

Implements hook_social_path_manager_group_tabs_alter().

File

modules/custom/social_path_manager/social_path_manager.module, line 174
The Social Path Manager module.

Code

function social_path_manager_social_path_manager_group_tabs_alter(array &$tabs) {
  foreach ($tabs as $key => $route) {

    // Only allow tabs that are part of the group.
    if ($key === 'social_group.stream' || strpos($key, 'social_group') === FALSE) {
      unset($tabs[$key]);
    }
  }
}