function og_CrumbsMultiPlugin_my_groups_overview::findParent__node_x in Crumbs, the Breadcrumbs suite 7
Same name and namespace in other branches
- 7.2 plugins/crumbs.og.inc \og_CrumbsMultiPlugin_my_groups_overview::findParent__node_x()
File
- plugins/
crumbs.og.inc, line 155
Class
- og_CrumbsMultiPlugin_my_groups_overview
- Make $my_groups_path the parent path for group nodes where the current user is a member. The priorities can be configured per group node type.
Code
function findParent__node_x($path, $item) {
$node = $item['map'][1];
// Load the node if it hasn't been loaded due to a missing wildcard loader.
$node = is_numeric($node) ? node_load($node) : $node;
if (og_is_group_type('node', $node->type)) {
$group = og_get_group('node', $node->nid);
if (!empty($group)) {
if (og_is_member($group->gid)) {
return array(
$node->type => 'user-groups',
);
}
}
}
}