function og_menu_single_node_prepare in OG Menu Single 7
Implements hook_node_prepare().
File
- ./
og_menu_single.module, line 38 - Creates a single menu per organic group on a site.
Code
function og_menu_single_node_prepare($node) {
if (og_menu_single_is_enabled_group_content('node', $node->type)) {
// Set PLID for form use later.
$node->group_plid = og_menu_single_get_active_plid();
if ($node->group_plid && !empty($node->nid)) {
if ($mlid = og_menu_single_get_link_mlid('node', $node->nid)) {
$link = menu_link_load($mlid);
$node->menu = $node->menu ? $link + $node->menu : $link;
}
}
}
}