PHP code example of clubdeuce / wp-share-this

1. Go to this page and download the library: Download clubdeuce/wp-share-this 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/ */

    

clubdeuce / wp-share-this example snippets


WP_Share_This::register_service( 'twitter', array(
    'username'    => 'myTwitterHandle',
    'share_count' => false,
) );

WP_Share_This::register_service( 'facebook', array(
    'image' => 'https://example.com/image.png',
);

WP_Share_This::register_service( 'email', array(
    'message' => __( 'Look at this really interesting article I found!', 'txt_domain' ),
) );  

WP_Share_This::the_sharing_links( array(
    'share_count' => false,
) );

WP_Share_This::the_sharing_links( array(
    'post' => get_post( $post_id ),
) );