PHP code example of arnaudban / add-social-media-link

1. Go to this page and download the library: Download arnaudban/add-social-media-link library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arnaudban / add-social-media-link example snippets


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

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

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

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

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

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