<?php
/**
 * Social Icons
 *
 * @package Betheme
 * @author Muffin group
 * @link http://muffingroup.com
 */

$target = mfn_opts_get('social-target') ? 'target="_blank"' : false;

echo '<ul class="social">';

	if (mfn_opts_get('social-skype')) {
		echo '<li class="skype"><a '. $target .' href="'. esc_attr(mfn_opts_get('social-skype')) .'" title="Skype"><i class="icon-skype"></i></a></li>';
	}
	if (mfn_opts_get('social-whatsapp')) {
		echo '<li class="whatsapp"><a '. $target .' href="'. esc_attr(mfn_opts_get('social-whatsapp')) .'" title="WhatsApp"><i class="icon-whatsapp"></i></a></li>';
	}
	if (mfn_opts_get('social-facebook')) {
		echo '<li class="facebook"><a '. $target .' href="'. esc_url(mfn_opts_get('social-facebook')) .'" title="Facebook"><i class="icon-facebook"></i></a></li>';
	}
	if (mfn_opts_get('social-twitter')) {
		echo '<li class="twitter"><a '. $target .' href="'. esc_url(mfn_opts_get('social-twitter')) .'" title="Twitter"><i class="icon-twitter"></i></a></li>';
	}
	if (mfn_opts_get('social-vimeo')) {
		echo '<li class="vimeo"><a '. $target .' href="'. esc_url(mfn_opts_get('social-vimeo')) .'" title="Vimeo"><i class="icon-vimeo"></i></a></li>';
	}
	if (mfn_opts_get('social-youtube')) {
		echo '<li class="youtube"><a '. $target .' href="'. esc_url(mfn_opts_get('social-youtube')) .'" title="YouTube"><i class="icon-play"></i></a></li>';
	}
	if (mfn_opts_get('social-flickr')) {
		echo '<li class="flickr"><a '. $target .' href="'. esc_url(mfn_opts_get('social-flickr')) .'" title="Flickr"><i class="icon-flickr"></i></a></li>';
	}
	if (mfn_opts_get('social-linkedin')) {
		echo '<li class="linkedin"><a '. $target .' href="'. esc_url(mfn_opts_get('social-linkedin')) .'" title="LinkedIn"><i class="icon-linkedin"></i></a></li>';
	}
	if (mfn_opts_get('social-pinterest')) {
		echo '<li class="pinterest"><a '. $target .' href="'. esc_url(mfn_opts_get('social-pinterest')) .'" title="Pinterest"><i class="icon-pinterest"></i></a></li>';
	}
	if (mfn_opts_get('social-dribbble')) {
		echo '<li class="dribbble"><a '. $target .' href="'. esc_url(mfn_opts_get('social-dribbble')) .'" title="Dribbble"><i class="icon-dribbble"></i></a></li>';
	}
	if (mfn_opts_get('social-instagram')) {
		echo '<li class="instagram"><a '. $target .' href="'. esc_url(mfn_opts_get('social-instagram')) .'" title="Instagram"><i class="icon-instagram"></i></a></li>';
	}
	if (mfn_opts_get('social-behance')) {
		echo '<li class="behance"><a '. $target .' href="'. esc_url(mfn_opts_get('social-behance')) .'" title="Behance"><i class="icon-behance"></i></a></li>';
	}
	if (mfn_opts_get('social-tumblr')) {
		echo '<li class="tumblr"><a '. $target .' href="'. esc_url(mfn_opts_get('social-tumblr')) .'" title="Tumblr"><i class="icon-tumblr"></i></a></li>';
	}
	if (mfn_opts_get('social-tripadvisor')) {
		echo '<li class="tripadvisor"><a '. $target .' href="'. esc_url(mfn_opts_get('social-tripadvisor')) .'" title="TripAdvisor"><i class="icon-tripadvisor"></i></a></li>';
	}
	if (mfn_opts_get('social-vkontakte')) {
		echo '<li class="vkontakte"><a '. $target .' href="'. esc_url(mfn_opts_get('social-vkontakte')) .'" title="VKontakte"><i class="icon-vkontakte"></i></a></li>';
	}
	if (mfn_opts_get('social-viadeo')) {
		echo '<li class="viadeo"><a '. $target .' href="'. esc_url(mfn_opts_get('social-viadeo')) .'" title="Viadeo"><i class="icon-viadeo"></i></a></li>';
	}
	if (mfn_opts_get('social-xing')) {
		echo '<li class="xing"><a '. $target .' href="'. esc_url(mfn_opts_get('social-xing')) .'" title="Xing"><i class="icon-xing"></i></a></li>';
	}
	if (mfn_opts_get('social-rss')) {
		echo '<li class="rss"><a '. $target .' href="'. esc_url(get_bloginfo('rss2_url')) .'" title="RSS"><i class="icon-rss"></i></a></li>';
	}

	if (mfn_opts_get('social-custom-icon') &&  mfn_opts_get('social-custom-link')) {
		$title = mfn_opts_get('social-custom-title');
		echo '<li class="custom"><a '. $target .' href="'. esc_url(mfn_opts_get('social-custom-link')) .'" title="'. esc_attr($title) .'"><i class="'. esc_attr(mfn_opts_get('social-custom-icon')) .'"></i></a></li>';
	}

echo '</ul>';
