Want more features on Pastebin? Sign Up, it's FREE!
Guest

Diff of changes to easy-social-media.php

By: a guest on Jan 4th, 2012  |  syntax: Diff  |  size: 2.25 KB  |  views: 60  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --- C:/Users/j/AppData/Local/Temp/easy--revBASE.svn000.tmp.php  Wed Jan  4 14:28:33 2012
  2. +++ C:/Users/j/Desktop/Energy/svnrepo/csa/trunk/public-html/wp-content/plugins/easy-social-media/easy-social-media.php  Wed Jan  4 14:51:45 2012
  3. @@ -64,23 +64,39 @@
  4.        
  5.        
  6.         //Adds Social Media Buttons to posts & pages
  7. -       function add_social_buttons($content) {
  8. +       function add_social_buttons($content, $url = '') {
  9.                 $social .= '<div id="easy-social-buttons">';
  10.  
  11. +    if ($url) {
  12. +      $href = array (
  13. +        'fb' => ' data-href="' . $url . '"',
  14. +        'twitter' => ' data-url="' . $url . '"',
  15. +        'google' => ' href="' . $url . '"',
  16. +        'linkedin' => ' data-url="' . $url . '"',
  17. +        'stumbleupon' => ' location="' . $url . '"',
  18. +      );
  19. +    } else {
  20. +      $href = array ();
  21. +    }
  22.                 //Facebook Button
  23. -               $social .= '<div class="easy-social-button"><div class="fb-like" ' . $href . 'data-send="true" data-layout="button_count" data-show-faces="false"></div></div>';
  24. +               $social .= '<div class="easy-social-button"><div class="fb-like" ' .
  25. +      $href['fb'] . 'data-send="true" data-layout="button_count" data-show-faces="false"></div></div>';
  26.                
  27.                 //Twitter Send
  28. -               $social .= '<div class="easy-social-button"><a href="https://twitter.com/share" class="twitter-share-button">Tweet</a></div>';
  29. +               $social .= '<div class="easy-social-button"><a href="https://twitter.com/share" class="twitter-share-button"' .
  30. +      $href['twitter'] .'>Tweet</a></div>';
  31.                
  32.                 //Google+ Button
  33. -               $social .= '<div class="easy-social-button"><g:plusone size="medium"></g:plusone></div>';
  34. +               $social .= '<div class="easy-social-button"><g:plusone size="medium"' .
  35. +      $href['google'] . '></g:plusone></div>';
  36.                
  37.                 //Linkedin Button
  38. -               $social .= '<div class="easy-social-button"><script type="IN/Share" data-counter="right"></script></div>';
  39. +               $social .= '<div class="easy-social-button"><script type="IN/Share"' .
  40. +      $href['linkedin'] .' data-counter="right"></script></div>';
  41.                
  42.                 //Stumbleupon Button
  43. -               $social .= '<div class="easy-social-button"><su:badge layout="1"></su:badge></div>';
  44. +               $social .= '<div class="easy-social-button"><su:badge' .
  45. +      $href['stumbleupon'] . ' layout="1"></su:badge></div>';
  46.                
  47.                 $social .= '</div>';
clone this paste RAW Paste Data