function theme_follow_link in Follow 6
Same name and namespace in other branches
- 5 follow.module \theme_follow_link()
- 7.2 follow.module \theme_follow_link()
- 7 follow.module \theme_follow_link()
Theme function to print an individual link.
Parameters
$link: A follow link object.
$title: The translated title of the social network.
1 theme call to theme_follow_link()
- theme_follow_links in ./
follow.module - Theme function to output a list of links.
File
- ./
follow.module, line 361 - Allows users to add links to their social network profiles.
Code
function theme_follow_link($variables) {
$link = $variables['link'];
$network = $variables['network'];
$title = !empty($link->title) ? $link->title : $network['title'];
// @see follow_link_tooltip().
$tooltip_callback = isset($network['tooltip callback']) && function_exists($network['tooltip callback']) ? $network['tooltip callback'] : 'follow_link_tooltip';
$tooltip = $tooltip_callback($title, $variables);
$classes = array();
$classes[] = 'follow-link';
$classes[] = "follow-link-{$link->name}";
$classes[] = $link->uid ? 'follow-link-user' : 'follow-link-site';
$attributes = array(
'class' => implode(' ', $classes),
'title' => $tooltip,
);
// Clean up the blank titles.
if ($title == '<none>') {
$title = '';
}
$link->options['attributes'] = $attributes;
return l($title, $link->path, $link->options) . "\n";
}