Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 2833 to 2854

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 8th December 2024 20:35 Europe/London time based on the source file dated 5th December 2024 17:20 Europe/London time.