Guest User

Untitled

a guest
Jul 8th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. <?php
  2.  
  3. class td_social_icons {
  4. static $td_social_icons_array = array(
  5. 'behance' => 'Behance',
  6.  
  7. 'delicious' => 'Delicious',
  8. 'deviantart' => 'Deviantart',
  9. 'digg' => 'Digg',
  10. 'dribbble' => 'Dribbble',
  11. 'evernote' => 'Evernote',
  12. 'facebook' => 'Facebook',
  13. 'flickr' => 'Flickr',
  14. 'forrst' => 'Forrst',
  15. 'googleplus' => 'Google+',
  16. 'grooveshark' => 'Grooveshark',
  17. 'html5' => 'Html5',
  18. 'instagram' => 'Instagram',
  19. 'lastfm' => 'Lastfm',
  20. 'linkedin' => 'Linkedin',
  21. 'mail-1' => 'Mail',
  22. 'myspace' => 'Myspace',
  23. 'path' => 'Path',
  24. 'paypal' => 'Paypal',
  25. 'picasa' => 'Picasa',
  26. 'pinterest' => 'Pinterest',
  27. 'posterous' => 'Posterous',
  28. 'reddit' => 'Reddit',
  29. 'rss' => 'RSS',
  30. 'share' => 'Share',
  31. 'skype' => 'Skype',
  32. 'soundcloud' => 'Soundcloud',
  33. 'spotify' => 'Spotify',
  34. 'stackoverflow' => 'Stackoverflow',
  35. 'steam' => 'Steam',
  36. 'stumbleupon' => 'StumbleUpon',
  37. 'tumblr' => 'Tumblr',
  38. 'twitter' => 'Twitter',
  39. 'vimeo' => 'Vimeo',
  40. 'vk' => 'VKontakte',
  41. 'windows' => 'Windows',
  42. 'wordpress' => 'Woordpress',
  43. 'yahoo' => 'Yahoo',
  44. 'blogger' => 'Blogger',
  45. 'youtube' => 'Youtube'
  46. );
  47.  
  48.  
  49. static function get_service_name($serviceId) {
  50. return self::$td_social_icons_array['$serviceId'];
  51. }
  52.  
  53.  
  54. static function get_icon($url, $icon_id, $open_in_new_window = false) {
  55. if ($open_in_new_window !== false) {
  56. $td_a_target = ' target="_blank"';
  57. } else {
  58. $td_a_target = '';
  59. }
  60.  
  61. if ($icon_id == 'mail-1') {
  62.  
  63. return '<span class="td-social-icon-wrap"><a' . $td_a_target . ' href="mailto:' . $url . '" title="' . self::$td_social_icons_array[$icon_id] . '"><i class="td-icon-font td-icon-' . $icon_id . '"></i></a></span>';
  64.  
  65. } else {
  66.  
  67. return '<span class="td-social-icon-wrap"><a' . $td_a_target . ' href="' . $url . '" title="' . self::$td_social_icons_array[$icon_id] . '"><i class="td-icon-font td-icon-' . $icon_id . '"></i></a></span>';
  68. }
  69. }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment