function og_invite_people_menu_alter in OG Invite People 7.2
Implements hook_menu_alter().
File
- ./
og_invite_people.module, line 64 - OG Invite People
Code
function og_invite_people_menu_alter(&$items) {
$remove_og_tab = variable_get('og_invite_people_remove_og_tab', 0);
if ($remove_og_tab) {
foreach (og_get_all_group_entity() as $entity_type => $value) {
if ($entity_type == 'taxonomy_term') {
$path = 'taxonomy/term/%/group';
}
else {
$path = "{$entity_type}/%/group";
}
if (isset($items[$path])) {
$items[$path]['access callback'] = FALSE;
unset($items[$path]['access arguments']);
}
}
}
}