You are here

function og_set_group_context in Organic groups 5.2

Same name and namespace in other branches
  1. 5.8 og.module \og_set_group_context()
  2. 5 og.module \og_set_group_context()
  3. 5.3 og.module \og_set_group_context()
  4. 5.7 og.module \og_set_group_context()
  5. 6.2 og.module \og_set_group_context()
  6. 6 og.module \og_set_group_context()
2 calls to og_set_group_context()
og_get_group_context in ./og.module
API function for getting the group context (if any) for the current request. Used for things like setting current theme and breadcrumbs. This context is set during og_theme()
og_theme in ./og.module
Override theme based on what group is being displayed (if any). Be smart about selecting the 'active' group for ambigous urls like node/$nid

File

./og.module, line 240

Code

function og_set_group_context($group_node = NULL) {
  static $stored_group_node;

  // something (contrib module?) was passing TRUE here so we avoid it too by checking with is_object.
  if (is_object($group_node)) {
    $stored_group_node = $group_node;
  }
  return $stored_group_node;
}