You are here

function ws_twitter_widget_data in Service links 6.2

Same name and namespace in other branches
  1. 7.2 services/widget_services.module \ws_twitter_widget_data()

Callback function for Twitter Widget.

1 string reference to 'ws_twitter_widget_data'
widget_services_service_links in services/widget_services.module
Implementation of hook_service_links().

File

services/widget_services.module, line 86
Extends Service Links with dynamic buttons.

Code

function ws_twitter_widget_data(&$service, $subst) {
  static $vars;
  if (!isset($vars)) {
    $vars['tags'] = array(
      'count' => '<data-count>',
      'via' => '<data-via>',
    );
    $vars['subst'] = array(
      'count' => check_plain(variable_get('service_links_tw_data_count', 'horizontal')),
      'via' => check_plain(variable_get('service_links_tw_data_via', '')),
    );
  }
  $service['url'] = str_replace($vars['tags'], $vars['subst'], $service['url']);
}