You are here

function theme_follow_link in Follow 7

Same name and namespace in other branches
  1. 5 follow.module \theme_follow_link()
  2. 6 follow.module \theme_follow_link()
  3. 7.2 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 338
Allows users to add links to their social network profiles.

Code

function theme_follow_link($variables) {
  $link = $variables['link'];
  $title = $variables['title'];
  $classes = array();
  $classes[] = 'follow-link';
  $classes[] = "follow-link-{$link->name}";
  $classes[] = $link->uid ? 'follow-link-user' : 'follow-link-site';
  $attributes = array(
    'class' => $classes,
    'title' => follow_link_title($link->uid) . ' ' . $title,
  );

  // Clean up the blank titles.
  if ($title == '<none>') {
    $title = '';
  }
  $link->options['attributes'] = $attributes;
  return l($title, $link->path, $link->options) . "\n";
}