function theme_tweetbutton_hashtag_display in Tweet Button 7.2
Same name and namespace in other branches
- 8 tweetbutton.module \theme_tweetbutton_hashtag_display()
File
- ./
tweetbutton.module, line 458
Code
function theme_tweetbutton_hashtag_display($variables) {
$script_url = _tweetbutton_get_widgets_js_url();
drupal_add_js($script_url, array(
'type' => 'external',
'scope' => 'footer',
));
$options = $variables['options'];
$attributes = tweetbutton_hashtag_get_attributes($options);
$query = array();
if (!empty($options['tweet_text'])) {
$query['tweet_text'] = $options['tweet_text'];
}
if (!empty($variables['hashtag'])) {
$query['button_hashtag'] = $variables['hashtag'];
}
$hash_link = l($hash_text, 'http://twitter.com/intent/tweet', array(
'query' => $query,
'attributes' => $attributes,
'external' => TRUE,
'https' => TRUE,
));
return '<div class="tweetbutton-hashtag tweetbutton">' . $hash_link . '</div>';
}