You are here

function og_context_ctools_entity_contexts_alter in Organic groups 7

Implements hook_ctools_entity_contexts_alter().

Change the OG context plugin.

See also

ctools_context_entity_get_children().

File

og_context/og_context.module, line 174
Get a group from a viewed page.

Code

function og_context_ctools_entity_contexts_alter(&$plugins) {
  if (empty($plugins['entity:group'])) {
    return;
  }
  $plugin =& $plugins['entity:group'];
  $plugin['context'] = 'og_context_create_og_group';
  $plugin['edit form'] = 'og_context_og_group_settings_form';
  $plugin['defaults'] = array(
    'type' => 'select',
    'gid' => '',
  );
}