You are here

function theme_addthis_element in AddThis 7.4

Theme the elements that are created in the AddThis module.

This is created with hook_addthis_element.

2 theme calls to theme_addthis_element()
addthis_displays_addthis_display_markup__addthis_basic_button in addthis_displays/addthis_displays.addthis.inc
Implements hook_addthis_display_markup__[display]().
addthis_displays_addthis_display_markup__addthis_basic_toolbox in addthis_displays/addthis_displays.addthis.inc
Implements hook_addthis_display_markup__[display]().

File

./addthis.module, line 210

Code

function theme_addthis_element($variables) {
  $element = $variables['addthis_element'];
  if (!isset($element['#value'])) {
    return '<' . $element['#tag'] . drupal_attributes($element['#attributes']) . " />\n";
  }
  $output = '<' . $element['#tag'] . drupal_attributes($element['#attributes']) . '>';
  if (isset($element['#value_prefix'])) {
    $output .= $element['#value_prefix'];
  }
  $output .= $element['#value'];
  if (isset($element['#value_suffix'])) {
    $output .= $element['#value_suffix'];
  }
  $output .= '</' . $element['#tag'] . ">\n";
  return $output;
}