You are here

private function ShareMessage::build_additional_services_part in Share Message 7

Function that adds additional services as part of addThis widget.

1 call to ShareMessage::build_additional_services_part()
ShareMessage::buildContent in includes/sharemessage.entity.inc
Overrides Entity::buildContent().

File

includes/sharemessage.entity.inc, line 356
Definition of ShareMessage entity class.

Class

ShareMessage

Code

private function build_additional_services_part() {
  $additional_services = isset($this->settings['additional_services']) ? $this->settings['additional_services'] : variable_get('sharemessage_default_additional_services', TRUE);
  $additional = '';
  if ($additional_services && $this
    ->getIconStyle() != 'addthis_counter_style') {
    $additional .= '<a class="addthis_button_compact"></a>';
  }
  $counter = isset($this->settings['counter']) ? $this->settings['counter'] : variable_get('sharemessage_default_counter', FALSE);
  if ($counter) {
    $additional .= '<a class="addthis_counter ' . $counter . '"></a>';
  }
  elseif ($this
    ->getIconStyle() == 'addthis_counter_style' && !empty($this->settings['additional_services'])) {
    $additional .= '<a class="addthis_counter"></a>';
  }
  return $additional;
}