function twitter_views_handler_field_web_intents::render in Twitter 7.5
Same name and namespace in other branches
- 7.6 twitter_views_field_handlers.inc \twitter_views_handler_field_web_intents::render()
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- ./
twitter_views_field_handlers.inc, line 106 - Views handlers for Twitter module.
Class
- twitter_views_handler_field_web_intents
- Adds Twitter Intents links.
Code
function render($values) {
drupal_add_js('//platform.twitter.com/widgets.js', 'external');
return '<span><a href="https://twitter.com/intent/tweet?in_reply_to=' . $values->twitter_id . '">' . t('Reply') . '</a></span> ' . '<span><a href="https://twitter.com/intent/retweet?tweet_id=' . $values->twitter_id . '">' . t('Retweet') . '</a></span> ' . '<span><a href="https://twitter.com/intent/favorite?tweet_id=' . $values->twitter_id . '">' . t('Favorite') . '</a></span>';
}