function socialmedia_twitter_tokens in Social media 7
1 string reference to 'socialmedia_twitter_tokens'
File
- ./
socialmedia.platforms.inc, line 922 - Defines social media platforms
Code
function socialmedia_twitter_tokens($key, $profile) {
if (empty($profile['url'])) {
return FALSE;
}
switch ($key) {
// Simple key values on the node.
case 'url':
return 'http://' . $profile['url'];
case 'url-brief':
return $profile['url'];
case 'username':
return $profile['username'] ? $profile['username'] : FALSE;
case 'userid':
return $profile['userid'] ? $profile['userid'] : FALSE;
case 'amp-username':
return '@' . $profile['username'];
case 'user-timeline-widget-id':
return isset($profile['user_timeline_widget_id']) ? $profile['user_timeline_widget_id'] : FALSE;
}
return '';
}