Advertisement
Guest User

custom-social-icons

a guest
Jul 1st, 2015
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.74 KB | None | 0 0
  1. // Custom Social Output
  2. //
  3. // Adding Yelp
  4. // =============================================================================
  5.  
  6. if ( ! function_exists( 'x_social_global' ) ) :
  7. function x_social_global() {
  8.  
  9. $facebook = x_get_option( 'x_social_facebook', '' );
  10. $twitter = x_get_option( 'x_social_twitter', '' );
  11. $google_plus = x_get_option( 'x_social_googleplus', '' );
  12. $linkedin = x_get_option( 'x_social_linkedin', '' );
  13. $xing = x_get_option( 'x_social_xing', '' );
  14. $foursquare = x_get_option( 'x_social_foursquare', '' );
  15. $youtube = x_get_option( 'x_social_youtube', '' );
  16. $vimeo = x_get_option( 'x_social_vimeo', '' );
  17. $instagram = x_get_option( 'x_social_instagram', '' );
  18. $pinterest = x_get_option( 'x_social_pinterest', '' );
  19. $dribbble = x_get_option( 'x_social_dribbble', '' );
  20. $flickr = x_get_option( 'x_social_flickr', '' );
  21. $behance = x_get_option( 'x_social_behance', '' );
  22. $tumblr = x_get_option( 'x_social_tumblr', '' );
  23. $whatsapp = x_get_option( 'x_social_whatsapp', '' );
  24. $soundcloud = x_get_option( 'x_social_soundcloud', '' );
  25. $rss = x_get_option( 'x_social_rss', '' );
  26.  
  27. $yelp = 'http://your-yelp-link-here/';
  28.  
  29. $output = '<div class="x-social-global">';
  30.  
  31. if ( $facebook ) : $output .= '<a href="' . $facebook . '" class="facebook" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon="&#xf082;"></i></a>'; endif;
  32. if ( $twitter ) : $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-icon-twitter-square" data-x-icon="&#xf081;"></i></a>'; endif;
  33. if ( $google_plus ) : $output .= '<a href="' . $google_plus . '" class="google-plus" title="Google+" target="_blank"><i class="x-icon-google-plus-square" data-x-icon="&#xf0d4;"></i></a>'; endif;
  34. if ( $linkedin ) : $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon="&#xf08c;"></i></a>'; endif;
  35. if ( $xing ) : $output .= '<a href="' . $xing . '" class="xing" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon="&#xf169;"></i></a>'; endif;
  36. if ( $foursquare ) : $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon="&#xf180;"></i></a>'; endif;
  37. if ( $youtube ) : $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-icon-youtube-square" data-x-icon="&#xf166;"></i></a>'; endif;
  38. if ( $vimeo ) : $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon="&#xf194;"></i></a>'; endif;
  39. if ( $instagram ) : $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon="&#xf16d;"></i></a>'; endif;
  40. if ( $pinterest ) : $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon="&#xf0d3;"></i></a>'; endif;
  41. if ( $dribbble ) : $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon="&#xf17d;"></i></a>'; endif;
  42. if ( $flickr ) : $output .= '<a href="' . $flickr . '" class="flickr" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon="&#xf16e;"></i></a>'; endif;
  43. if ( $behance ) : $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon="&#xf1b5;"></i></a>'; endif;
  44. if ( $tumblr ) : $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon="&#xf174;"></i></a>'; endif;
  45. if ( $whatsapp ) : $output .= '<a href="' . $whatsapp . '" class="tumblr" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon="&#xf232;"></i></a>'; endif;
  46. if ( $soundcloud ) : $output .= '<a href="' . $soundcloud . '" class="soundcloud" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon="&#xf1be;"></i></a>'; endif;
  47. if ( $rss ) : $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon="&#xf143;"></i></a>'; endif;
  48.  
  49. if ( $yelp ) : $output .= '<a href="' . $yelp . '" class="yelp" title="Yelp" target="_blank"><i class="x-icon-yelp" data-x-icon="&#xf1e9;"></i></a>'; endif;
  50.  
  51. $output .= '</div>';
  52.  
  53. echo $output;
  54.  
  55. }
  56. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement