Use YOURLs Shortlink with Xoogu’s Simple Social Sharing Plugin

This content 6 years old. Please, read this page keeping its age in mind along with the fact technology changes fast and the information on this page me be outdated, not best practice, or plain wrong.

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

Speak Your Mind

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.