function theme_follow_links in Follow 7
Same name and namespace in other branches
- 5 follow.module \theme_follow_links()
- 6 follow.module \theme_follow_links()
- 7.2 follow.module \theme_follow_links()
Theme function to output a list of links.
Parameters
$links: An array of follow link objects.
$networks: An array of network names, keys are machine names, values are visible titles.
$alignment: A string depicting whether the icons should be displayed in a "horizontal" or "vertical" list.
2 theme calls to theme_follow_links()
- follow_preprocess_page in ./
follow.module - Implementation of hook_preprocess_page().
- _follow_block_content in ./
follow.module - Helper function to build the block content display.
File
- ./
follow.module, line 311 - Allows users to add links to their social network profiles.
Code
function theme_follow_links($variables) {
$links = $variables['links'];
$networks = $variables['networks'];
$wrapper = $variables['alignment'] == 'horizontal' ? 'span' : 'div';
$output = '<div class="follow-links clearfix">';
foreach ($links as $link) {
$title = !empty($link->title) ? $link->title : $networks[$link->name]['title'];
$output .= '<' . $wrapper . ' class="follow-link-wrapper follow-link-wrapper-' . $link->name . '">';
$output .= theme('follow_link', array(
'link' => $link,
'title' => $title,
));
$output .= '</' . $wrapper . '>';
}
$output .= '</div>';
return $output;
}