function tweet_link in Tweet 6.2
Same name and namespace in other branches
- 5.2 tweet.module \tweet_link()
- 5 tweet.module \tweet_link()
- 6.4 tweet.module \tweet_link()
- 6 tweet.module \tweet_link()
- 6.3 tweet.module \tweet_link()
Implementation of hook_link().
File
- ./
tweet.module, line 24 - Builds links to post pages to twitter.
Code
function tweet_link($type, $node = NULL, $teaser = FALSE) {
if ($type == 'node' && in_array($node->type, variable_get('tweet_types', _tweet_node_types())) && !_tweet_exclude($node->nid)) {
$title = variable_get('tweet_title', 1);
if (!$teaser) {
$link_type = variable_get('tweet_node', 'icon');
if ($link_type != 'none') {
$links['tweet'] = _tweet_to_twitter($link_type, '', $node->nid);
return $links;
}
}
else {
$link_type = variable_get('tweet_teaser', 'none');
if ($link_type != 'none') {
$links['tweet'] = _tweet_to_twitter($link_type, '', $node->nid);
return $links;
}
}
}
}