You are here

function fasttoggle_preprocess_author_pane in Author Pane 6.2

Same name and namespace in other branches
  1. 5 modules/fasttoggle.author-pane.inc \fasttoggle_preprocess_author_pane()
  2. 6 modules/fasttoggle.author-pane.inc \fasttoggle_preprocess_author_pane()
  3. 7.2 modules/fasttoggle.author-pane.inc \fasttoggle_preprocess_author_pane()

Implementation of hook_preprocess_author_pane().

File

modules/fasttoggle.author-pane.inc, line 11
Provides a preprocess function on behalf of the fasttoggle module.

Code

function fasttoggle_preprocess_author_pane(&$variables) {

  // Check if this preprocess needs to be run given who's calling it.
  if (!author_pane_run_preprocess('fasttoggle', $variables['caller'])) {
    return;
  }

  // The full user object for the author
  global $user;
  $account_id = $variables['account']->uid;
  if ($account_id != 0 && $account_id != $user->uid) {
    $account = $variables['account'];
    $variables['fasttoggle_block_author'] = theme('links', fasttoggle_link('user', $account), array(
      'class' => 'links inline',
    ));
  }
}