Exemple #1
0
if (author_has('twitter')) {
    ?>
						<a href="<?php 
    echo esc_url(url_social_site('twitter'));
    ?>
" class="link--naked">
							<span class="visuallyhidden focusable">Twitter</span>
							<span class="text-icon text-icon--twitter text-icon--social">&#xf081;</span>
						</a>
					<?php 
}
?>
					<?php 
if (author_has('linkedin')) {
    ?>
						<a href="<?php 
    echo esc_url(url_social_site('linkedin'));
    ?>
" class="link--naked">
							<span class="visuallyhidden focusable">Linkedin</span>
							<span class="text-icon text-icon--linkedin text-icon--social">&#xf08c;</span>
						</a>
					<?php 
}
?>
				</p>
			</div>
		</div>
	</div>
</aside>
<?php 
/**
 * Determines if the user has a social site account
 *
 * @param string $social_site The social site to check.
 *
 * @return bool
 */
function author_has($social_site)
{
    $link = url_social_site($social_site);
    return !empty($link);
}