You are here

function theme_google_analytics_reports_api_profile_label in Google Analytics Reports 7.3

Returns HTML for the full string label of profiles.

Parameters

array $variables: An associative array containing:

  • profile: Google Analytics profile object.
3 theme calls to theme_google_analytics_reports_api_profile_label()
google_analytics_reports_api_admin in google_analytics_reports_api/google_analytics_reports_api.admin.inc
Menu callback - admin form for OAuth and other settings.
google_analytics_reports_api_profiles_list in google_analytics_reports_api/google_analytics_reports_api.admin.inc
Google Analytics reports profiles for current authorized user.
google_analytics_reports_plugin_query_google_analytics::options_form in plugins/google_analytics_reports_plugin_query_google_analytics.inc
Add settings for the ui.

File

google_analytics_reports_api/google_analytics_reports_api.module, line 209
Implements the API through which Google Analytics data can be accessed.

Code

function theme_google_analytics_reports_api_profile_label($variables) {
  if (isset($variables['active']) && $variables['active']) {
    return parse_url($variables['profile']->websiteUrl, PHP_URL_HOST) . ' - ' . $variables['profile']->name . ' (' . $variables['profile']->id . ')';
  }
  else {
    return $variables['profile']->name . ' (' . $variables['profile']->id . ')';
  }
}