You are here

og.author-pane.inc in Author Pane 6

This file provides a preprocess function on behalf of the OG module.

File

modules/og.author-pane.inc
View source
<?php

/**
 * @file
 *   This file provides a preprocess function on behalf of the OG module.
 */

/**
 * Implementation of hook_preprocess_author_pane().
 */
function og_preprocess_author_pane(&$variables) {
  $account = $variables['account'];
  if (isset($account->og_groups) && !empty($account->og_groups)) {
    $groups = array();
    foreach ($account->og_groups as $og_id => $og) {
      $groups[] = l($og['title'], 'node/' . $og['nid']);
    }
    $variables['og_groups'] = implode(', ', $groups);
  }
  else {
    $variables['og_groups'] = t('None');
  }
}

Functions

Namesort descending Description
og_preprocess_author_pane Implementation of hook_preprocess_author_pane().