Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 2775 to 2796

Definition

 
function renderSocialMediaShareLinksForUrl($url)
{
    global 
$social_media_links;

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

    if (
in_array("twitter"$social_media_links)) { ?>
        <!-- Twitter -->
        <a target="_blank" href="https://twitter.com/intent/tweet?url= echo urlencode($url); ?>"><i class="fa-brands fa-xl fa-square-x-twitter" 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 urlencode($url); ?>"><i class="fa-brands fa-xl fa-linkedin" aria-hidden="true"></i></a>
        
    
}
}

This article was last updated 23rd July 2024 21:35 Europe/London time based on the source file dated 22nd July 2024 10:25 Europe/London time.