More of these posts need tags.
More Tags
function yoast_social_link_shortcode($atts, $content = null) {
// Extract shortcode attributes
extract(shortcode_atts(array(
‘network’ => ‘facebook’,
), $atts));
// Get the social link
$social_link = get_yoast_user_social_link($network);
// If the social link exists, return it wrapped around the content
if ($social_link) {
return ‘‘ . $content . ‘‘;
}
// If no social link, just return the content
return $content;
}
add_shortcode(‘yoast_social_link’, ‘yoast_social_link_shortcode’);

0 Comments