Use YOURLs Shortlink with Xoogu's Simple Social Sharing Plugin

This article was posted more than 1 year ago. Please keep in mind that the information on this page may be outdated, insecure, or just plain wrong today.

I installed Xoogu’s Simple Social Sharing Plugin and have been using it on my site for visitors to share content.  I also use YOURLs to create shortlinks to my posts.  In order to have Xoogu’s plugin work, the YOURLs plugin I have installed is YOURLs Link Creator which will replace the shortlink with the YOURLs shortlink wherever wp_get_shortlink() is called.

Configure Xoogu Simple Social Sharing Plugin

  1. Go into Plugins > Editor in the Admin Panel of WordPress.
  2. Select the Xoogu Simple Social Sharing plugin
  3. Choose the xoogu_simpleSocialSharing.php file
  4. Look for the lines similar to below:
    public function add_links($content){
    		global $post;
    		$links = $this->_options['links'];
    		if(empty($links)){
    			return $content;
    		}
    		$css = $this->_options['css'];
    		$link = urlencode(get_permalink());
    		$title=urlencode($post->post_title);
    		$summary=get_post_meta( $post->ID, 'description', true);
    		if(empty($summary)){
  5. Replace the red line with the following:
    $link = urlencode(wp_get_shortlink());
  6. Save the file

You’ll see in the screenshot below that the YOURLs shortlink is now working.  =)
2014-07-29_114051

#wordpress