social_media_links.iconsets.inc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php
  2. /**
  3. * @file
  4. * Callbacks for the icon sets.
  5. */
  6. /**
  7. * Register the default icon sets.
  8. *
  9. * @return array
  10. * Array of icon sets.
  11. */
  12. function social_media_links_social_media_links_iconset_info() {
  13. $icons['elegantthemes'] = array(
  14. 'name' => 'Elegant Themes Icons',
  15. 'publisher' => 'Elegant Themes',
  16. 'publisher url' => 'http://www.elegantthemes.com/',
  17. 'styles' => array(
  18. '32' => '32x32',
  19. ),
  20. 'path callback' => 'social_media_links_path_elegantthemes',
  21. 'download url' => 'http://www.elegantthemes.com/blog/resources/beautiful-free-social-media-icons',
  22. );
  23. $icons['nouveller'] = array(
  24. 'name' => 'Social Meida Bookmark Icon +',
  25. 'publisher' => 'nouveller',
  26. 'publisher url' => 'http://www.nouveller.com/',
  27. 'path callback' => 'social_media_links_path_nouveller',
  28. 'download url' => 'http://www.nouveller.com/general/free-social-media-bookmark-icon-pack-the-ever-growing-icon-set/',
  29. 'styles' => array(
  30. '16' => '16x16',
  31. '32' => '32x32',
  32. 'buttons' => '122x42',
  33. ),
  34. );
  35. $icons['themeid'] = array(
  36. 'name' => 'themeiD 26 Social Media Icon Sets',
  37. 'publisher' => 'themeiD',
  38. 'publisher url' => 'http://themeid.com/',
  39. 'download url' => 'http://themeid.com/26-free-social-media-icon-sets/',
  40. 'path callback' => 'social_media_links_path_themeid',
  41. 'styles' => array(
  42. '32' => '32x32',
  43. ),
  44. );
  45. $icons['webtoolkit'] = array(
  46. 'name' => 'webtoolkit Icon Set',
  47. 'publisher' => 'webtoolkit4.me',
  48. 'publisher url' => 'http://webtoolkit4.me/',
  49. 'download url' => 'http://webtoolkit4.me/2008/09/05/webtoolkit4me-releases-the-first-icon-set/',
  50. 'path callback' => 'social_media_links_path_webtoolkit',
  51. 'styles' => array(
  52. '24' => '24x24',
  53. '32' => '32x32',
  54. '48' => '48x48',
  55. '62' => '62x62',
  56. ),
  57. );
  58. return $icons;
  59. }
  60. /**
  61. * Callback with the informations about the elegantthemes icon set.
  62. *
  63. * @param string $platform
  64. * Name of the platform for which the path is returned.
  65. *
  66. * @param string $style
  67. * Size of the icons.
  68. *
  69. * @return string
  70. * The image path.
  71. */
  72. function social_media_links_path_elegantthemes($platform = 'twitter', $style = NULL) {
  73. $info = social_media_links_iconset('elegantthemes');
  74. switch ($platform) {
  75. case 'contact':
  76. $platform = 'email';
  77. break;
  78. case 'youtube_channel':
  79. $platform = 'youtube';
  80. break;
  81. }
  82. $path = isset($info['path']) ? $info['path'] . '/PNG/' . $platform . '.png' : '';
  83. return $path;
  84. }
  85. /**
  86. * Callback with the informations about the nouveller icon set.
  87. *
  88. * @param string $platform
  89. * Name of the platform for which the path is returned.
  90. *
  91. * @param string $style
  92. * Size of the icons.
  93. *
  94. * @return string
  95. * The image path.
  96. */
  97. function social_media_links_path_nouveller($platform = 'twitter', $style = '32') {
  98. $info = social_media_links_iconset('nouveller');
  99. switch ($platform) {
  100. case 'contact':
  101. $platform = 'email';
  102. break;
  103. case 'googleplus':
  104. $platform = 'google';
  105. break;
  106. case 'youtube_channel':
  107. $platform = 'youtube';
  108. break;
  109. }
  110. $path = isset($info['path']) ? $info['path'] . '/' . $style . '/' . $platform . '.png' : '';
  111. return $path;
  112. }
  113. /**
  114. * Callback with the informations about the themeiD icon set.
  115. *
  116. * @param string $platform
  117. * Name of the platform for which the path is returned.
  118. *
  119. * @param string $style
  120. * Size of the icons.
  121. *
  122. * @return string
  123. * The image path.
  124. */
  125. function social_media_links_path_themeid($platform = 'twitter', $style = '32') {
  126. $info = social_media_links_iconset('themeid');
  127. switch ($platform) {
  128. case 'contact':
  129. $platform = 'email';
  130. break;
  131. case 'googleplus':
  132. $platform = 'google';
  133. break;
  134. case 'youtube_channel':
  135. $platform = 'youtube';
  136. break;
  137. }
  138. $path = isset($info['path']) ? $info['path'] . '/' . $platform . '-icon.png' : '';
  139. return $path;
  140. }
  141. /**
  142. * Callback with the informations about the themeiD icon set.
  143. *
  144. * @param string $platform
  145. * Name of the platform for which the path is returned.
  146. *
  147. * @param string $style
  148. * Size of the icons.
  149. *
  150. * @return string
  151. * The image path.
  152. */
  153. function social_media_links_path_webtoolkit($platform = 'twitter', $style = '32') {
  154. $info = social_media_links_iconset('webtoolkit');
  155. switch ($platform) {
  156. case 'googleplus':
  157. $platform = 'google';
  158. break;
  159. case 'youtube_channel':
  160. $platform = 'youtube';
  161. break;
  162. }
  163. $path = isset($info['path']) ? $info['path'] . '/' . $style . 'x' . $style . '/' . $platform . '.png' : '';
  164. return $path;
  165. }