arnaudban/add-social-media-link

WordPress plugin to add socialmedia link

Installs: 3 470

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Type:wordpress-plugin

v2.6 2022-01-04 13:22 UTC

This package is auto-updated.

Last update: 2024-11-04 19:17:15 UTC


README

WordPress plugin to add the social media menu links, and social media share links.

The share links don't load any external script and do not track user

Social media menu links

Use

if( function_exists( 'ABSocialMediaLink\social_media_menu' ) ){
    ABSocialMediaLink\social_media_menu();
}

Filter the supported social media menu links

add_filter('ABSocialMediaLink/supported_social_media', function(){
  return array('twitter-alt','facebook','instagram');
});

Social media share links

Links to display

add_filter('ABSocialMediaLink/post_type_to_share', function(){
  return [ 'twitter','facebook','reddit'];
});

Posts type to share

add_filter('ABSocialMediaLink/post_type_to_share', function(){
  return [ 'post','product'];
});

Display html before share links

add_filter('ABSocialMediaLink/before_links', function(){
  return '<h2>Partager :</h2>';
});

Display html after share links

add_filter('ABSocialMediaLink/after_links', function(){
  return '<p>Merci ;-)</p>';
});