Plugin Directory

Social Media Shortcode Pack

Registers shortcodes for your posts, pages, or post types that display user profile links to various social media websites.

How to use the provided filters

function example_add_site( $sites ) {
    $sites is going to be an array of arrays.
    "somesite" should be the word you want to use with the shortcode
    "Some Site" is the "pretty" name for the site
    "http://www.somesite.com/user/" is the url for a user's profile, without the user name appended
    $sites['somesite'] = array( 'Some Site', 'http://www.somesite.com/user/' );

    //Return the $sites array
    return $sites;
add_filter( 'smsc_shortcodes', 'example_add_site' );

function example_add_classes( $classes ) {
    $classes will be an array

    $classes[] = 'someclass';

    class attribute that be added to the <a> tag will be: class="smsc somesite_smsc someclass"
    return $classes;
add_filter( 'smsc_classes', 'example_add_classes' );

function example_change_final_link( $output, $shortcode ) {
    $output will be the final constructed link that will be displayed in your post
    $shortcode is the shortcode word used for the current shortcode. Example: "somesite". Useful for conditional application.

    if ( 'somesite' == $shortcode ) {
        $output_new = $output . ' <--Awesome profile!';

    $output_new will equal:
    "<a href="http://www.somesite.com/user/tw2113" title="tw2113's Some Site profile" class="smsc somesite_smsc" target="_blank">test text</a> <--Awesome profile!"

    return $output_new;
add_filter( 'smsc_final_link', 'example_change_final_link', 10, 2 );

Requires: 3.7 or higher
Compatible up to: 4.6.1
Last Updated: 3 weeks ago
Active Installs: 300+


5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.