You are here

function addthis_get_custom_services in AddThis 6.3

Get custom service definitions.

Return value

array An array of service definitions keyed by service code.

2 calls to addthis_get_custom_services()
addthis_config_form in ./addthis.admin.inc
Return a form object for default AddThis settings.
theme_addthis_toolbox_item in ./addthis.module
Theme function to render an individual toolbox item. This is often, but not necessarily, in the context of an AddThis toolbox.

File

./addthis.module, line 281
Provides integration with the AddThis.com bookmarking & sharing service.

Code

function addthis_get_custom_services() {

  // Get service definitions from modules.
  $services = module_invoke_all('addthis_toolbox_services');
  drupal_alter('addthis_toolbox_services', $services);

  // Get service definitions from the Service Customizations form.
  $definitions = variable_get('addthis_service_customizations', array());
  foreach ($definitions as $def) {
    $services[trim(check_plain($def['code']))] = $def;
  }
  return $services;
}