function follow_link_title in Follow 5
Same name and namespace in other branches
- 6 follow.module \follow_link_title()
- 7.2 follow.inc \follow_link_title()
- 7 follow.module \follow_link_title()
Helper function to create a link or block title.
Parameters
$uid: The uid of the user account. Defaults to the site form, $uid = 0.
2 calls to follow_link_title()
- theme_follow_link in ./
follow.module - Theme function to print an individual link.
- _follow_block_subject in ./
follow.module - Helper function to build the block title.
File
- ./
follow.module, line 199 - Allows users to add links to their social network profiles.
Code
function follow_link_title($uid = 0) {
// Check to see if we have a valid username.
if ($uid) {
$setting = variable_get('follow_user_block_title', FOLLOW_NAME);
// Special handling for usernames.
if ($setting == FOLLOW_NAME) {
$account = user_load(array(
'uid' => $uid,
));
// Set plain to TRUE for realname module support.
return t('Follow !name on', array(
'!name' => theme('username', $account),
));
}
return t('Follow me on');
}
switch (variable_get('follow_site_block_title', FOLLOW_NAME)) {
case FOLLOW_NAME:
return t('Follow @name on', array(
'@name' => variable_get('site_name', 'Drupal'),
));
case FOLLOW_ME:
return t('Follow me on');
case FOLLOW_US:
return t('Follow us on');
}
}