You are here

function _mailchimp_get_user_agent in Mailchimp 7.4

Same name and namespace in other branches
  1. 8 mailchimp.module \_mailchimp_get_user_agent()
  2. 7.5 mailchimp.module \_mailchimp_get_user_agent()
  3. 2.x mailchimp.module \_mailchimp_get_user_agent()

Gets the user agent string for this installation of Mailchimp.

Return value

string The user agent string.

1 call to _mailchimp_get_user_agent()
mailchimp_get_api_object in ./mailchimp.module
Get an instance of the Mailchimp library.

File

./mailchimp.module, line 211
Mailchimp module.

Code

function _mailchimp_get_user_agent() {
  $version = '7.x-4.x';
  if (module_exists('system')) {
    $info = system_get_info('module', 'mailchimp');
    if (!empty($info['version'])) {
      $version = $info['version'];
    }
  }
  $user_agent = "DrupalMailchimp/{$version} " . \GuzzleHttp\default_user_agent();
  return $user_agent;
}