You are here

function sharemessage_get_services_json in Share Message 7

Getter for the services definitions.

If option is set the local file within the module folder will be read instead of the file that is hosted on the addthis cdn.

Return value

string The path to the services definition file.

1 call to sharemessage_get_services_json()
sharemessage_get_addthis_services in ./sharemessage.module
Load AddThis services.

File

./sharemessage.module, line 626
New Sharing Module.

Code

function sharemessage_get_services_json() {
  if (variable_get('sharemessage_local_services_definition', FALSE)) {
    $file_uri = drupal_get_path('module', 'sharemessage') . '/addthis/sharing.en.json';
  }
  else {
    $file_uri = 'http://cache.addthiscdn.com/services/v1/sharing.en.json';
  }
  return file_get_contents($file_uri);
}