Skip to content

ArnaudBan/arnaudban-add-social-media-link

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Add social medial ink

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>';
});

About

WordPress plugin to add the social media link

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 94.6%
  • CSS 2.9%
  • JavaScript 2.5%