function og_menu_single_pane_render in OG Menu Single 7
Run-time rendering of the body of the block (content type) See ctools_plugin_examples for more advanced info
1 string reference to 'og_menu_single_pane_render'
- og_menu_single_menu.inc in plugins/
content_types/ og_menu_single_menu.inc
File
- plugins/
content_types/ og_menu_single_menu.inc, line 25
Code
function og_menu_single_pane_render($subtype, $conf, $args, $context = NULL) {
$plid = og_menu_single_get_active_plid();
if (!empty($conf['og_menu_single_parent'])) {
$plid = $conf['og_menu_single_parent'];
if ($plid === 'auto') {
$result = module_invoke_all('og_menu_single_menu_parent', $conf);
$plid = reset($result);
}
}
if ($plid) {
$tree = og_menu_single_children_items($plid, !empty($conf['og_menu_single_depth']) ? $conf['og_menu_single_depth'] : MENU_MAX_DEPTH);
if ($tree && ($output = menu_tree_output($tree))) {
$block = new stdClass();
$block->title = '';
$block->content = $output;
// Don't want to do menu_link_load if overriding title.
if (empty($conf['override_title'])) {
$item = og_menu_single_menu_link_load($plid);
$block->title = l($item['link_title'], $item['link_path'], $item['options']);
}
return $block;
}
}
return FALSE;
}