You are here

function location_preprocess_author_pane in Author Pane 5

Same name and namespace in other branches
  1. 6 modules/location.author-pane.inc \location_preprocess_author_pane()

Implementation of hook_preprocess_author_pane().

File

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

Code

function location_preprocess_author_pane(&$variables) {
  $account_id = $variables['account']->uid;
  if ($account_id != 0) {
    $account = $variables['account'];
    if (function_exists('location_display') && variable_get('location_display_location', 1) && isset($account->locations) && count($account->locations)) {
      $settings = variable_get('location_settings_user', array());
      $location = location_display($settings, $account->locations);
      $variables['location_user_location'] = $location['#value'];
    }
  }
}