function theme_twitter_user_accounts in Twitter 6.5
Same name and namespace in other branches
- 7.6 twitter.module \theme_twitter_user_accounts()
- 7.5 twitter.module \theme_twitter_user_accounts()
Default callback for theme('twitter_user_accounts');
Renders a list of Twitter accounts for the user profile page.
1 theme call to theme_twitter_user_accounts()
- twitter_user in ./
twitter.module - Implements hook_user().
File
- ./
twitter.module, line 125 - Provides API integration with the Twitter microblogging service.
Code
function theme_twitter_user_accounts($accounts) {
$items = array();
foreach ($accounts as $twitter_account) {
$tweets = twitter_tweets($twitter_account->screen_name);
// If we have tweets for this Twitter account, link to the View. If not, link to Twitter.
if (count($tweets)) {
$items[] = l('@' . $twitter_account->screen_name, 'tweets/' . $twitter_account->screen_name);
}
else {
$items[] = _twitter_user_profile($twitter_account->screen_name);
}
}
return theme('item_list', $items);
}