<?php
if ( get_theme_mod( 'tropicana-font-awesome-version', customizer_library_get_default( 'tropicana-font-awesome-version' ) ) == '4.7.0' ) {
	$font_awesome_code = 'otb-fa';
	$font_awesome_brand_code = 'otb-fa';
	$font_awesome_icon_prefix = 'otb-';
} else {
	$font_awesome_code = 'fa';
	$font_awesome_brand_code = 'fab';
	$font_awesome_icon_prefix = '';
}
?>

<ul class="social-links">
<?php
if( get_theme_mod( 'tropicana-social-email', customizer_library_get_default( 'tropicana-social-email' ) ) != '' ) :
    echo '<li><a href="' . esc_attr( 'mailto:' . antispambot( get_theme_mod( 'tropicana-social-email' ), 1 ) ) . '" target="_blank" rel="noopener" title="';
	esc_attr_e( 'Send us an email', 'tropicana' );
	echo '" class="social-email"><i class="' .$font_awesome_code. ' ' .$font_awesome_icon_prefix. 'fa-envelope-o"></i></a></li>';
endif;

if( get_theme_mod( 'tropicana-social-skype', customizer_library_get_default( 'tropicana-social-skype' ) ) != '' ) :
    echo '<li><a href="' . esc_attr( 'skype:' . get_theme_mod( 'tropicana-social-skype' ) . '?userinfo' ) . '" rel="noopener" title="';
	esc_attr_e( 'Contact us on Skype', 'tropicana' );
	echo '" class="social-skype"><i class="' .$font_awesome_brand_code. ' ' .$font_awesome_icon_prefix. 'fa-skype"></i></a></li>';
endif;

if( get_theme_mod( 'tropicana-social-tumblr', customizer_library_get_default( 'tropicana-social-tumblr' ) ) != '' ) :
    echo '<li><a href="' . esc_url( get_theme_mod( 'tropicana-social-tumblr' ) ) . '" target="_blank" rel="noopener" title="';
	esc_attr_e( 'Find us on Tumblr', 'tropicana' );
	echo '" class="social-tumblr"><i class="' .$font_awesome_brand_code. ' ' .$font_awesome_icon_prefix. 'fa-tumblr"></i></a></li>';
endif;

if( get_theme_mod( 'tropicana-social-flickr', customizer_library_get_default( 'tropicana-social-flickr' ) ) != '' ) :
    echo '<li><a href="' . esc_url( get_theme_mod( 'tropicana-social-flickr' ) ) . '" target="_blank" rel="noopener" title="';
	esc_attr_e( 'Find us on Flickr', 'tropicana' );
	echo '" class="social-flickr"><i class="' .$font_awesome_brand_code. ' ' .$font_awesome_icon_prefix. 'fa-flickr"></i></a></li>';
endif;
?>
</ul>