Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

renderSocialMediaShareLinksForUrl()

Description

Renders social media links in order to share a particular link

Parameters

ColumnTypeDefaultDescription
$url string The URL to be shared on social media networks

Return

void

Location

include/render_functions.php lines 2368 to 2399

Definition

 
function renderSocialMediaShareLinksForUrl($url)
    {
    global 
$social_media_links;

    
$url_encoded urlencode($url);

    if(
in_array("facebook"$social_media_links))
        {
        
?>
        <!-- Facebook -->
        <a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u= echo $url_encoded?>"><i class="fa fa-lg fa-facebook-official" aria-hidden="true"></i></a>
        
        
}

    if (
in_array("twitter"$social_media_links))
        {
        
?>
        <!-- Twitter -->
        <a target="_blank" href="https://twitter.com/?status= echo $url_encoded?>"><i class="fa fa-lg fa-twitter-square" aria-hidden="true"></i></a>
        
        
}

    if (
in_array("linkedin"$social_media_links))
        {
        
?>
        <!-- LinkedIn -->
        <a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url= echo $url_encoded?>"><i class="fa fa-lg fa-linkedin-square" aria-hidden="true"></i></a>
        
        
}

    return;
    }

This article was last updated 11th July 2020 21:35 Europe/London time based on the source file dated 8th July 2020 11:40 Europe/London time.