You are here

function hook_addthis_markup_alter in AddThis 7.4

Implements hook_TYPE_alter().

Parameters

array $markup: $markup contains an array with the structure of the addthis markup.

1 invocation of hook_addthis_markup_alter()
AddThis::getDisplayMarkup in classes/AddThis.php

File

./addthis.api.php, line 45
This is currently a stub file that will be used to describe the addthis implementation API.

Code

function hook_addthis_markup_alter(&$markup) {

  // Let's add a custom CSS class for given a particular design to our
  // twitter button, so we can change the look.
  if (!empty($markup['twitter'])) {
    $markup['twitter']['#attributes']['class'][] = "custom_twitter_class";
  }

  // Or change button size for Google +1 for example.
  if (!empty($markup['google_plusone'])) {
    $markup['google_plusone']['#attributes']['g:plusone:size'] = 'small';
  }
}