function addthis_get_services_json in Share Message 8
Getter for the AddThis 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 addthis_get_services_json()
- sharemessage_get_addthis_services in ./
sharemessage.module - Load AddThis services.
File
- ./
sharemessage.module, line 207 - New Sharing Module.
Code
function addthis_get_services_json() {
if (\Drupal::config('sharemessage.addthis')
->get('local_services_definition')) {
$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);
}