You are here

function og_menu_single_get_active_plid in OG Menu Single 7

Fetched the space mlid of the current space in the menu.

Return value

The active menu link ID for current group.

4 calls to og_menu_single_get_active_plid()
og_menu_single_block_view in ./og_menu_single.module
Implements hook_block_view().
og_menu_single_node_prepare in ./og_menu_single.module
Implements hook_node_prepare().
og_menu_single_pane_edit_form in plugins/content_types/og_menu_single_menu.inc
Custom edit form to allow users to enable/disable selectable content types
og_menu_single_pane_render in plugins/content_types/og_menu_single_menu.inc
Run-time rendering of the body of the block (content type) See ctools_plugin_examples for more advanced info

File

./og_menu_single.module, line 434
Creates a single menu per organic group on a site.

Code

function og_menu_single_get_active_plid() {
  $context = og_context();

  // TODO
  if (!$context || $context['group_type'] != 'node' || !$context['gid']) {
    return NULL;
  }

  // Set PLID for form use later.
  return og_menu_single_get_link_mlid_or_create($context['group_type'], $context['gid']);
}