Adding Google Plus to Light Social Plugin for WordPress
I’ve just switched to Light Social plugin because I have problems with other plugins such as Digg Digg and Sexy Bookmarks. The Light Social plugin is not updated anymore, so Google Buzz button is still there, but there is no Google+ button.
In order to replace Google Buzz button by Google+ button, you simply need to modify code_google_buzz function in wp-content/plugins/light-social/lightsocial.php as follows:
function code_google_buzz($title, $link, $img_prefix)
{
return '<div class="lightsocial_element">
<g:plusone size="small"></g:plusone>
<script type="text/javascript">
(function() {
var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
po.src = \'https://apis.google.com/js/plusone.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
})();
</script></div>';
}















Funny.
Why isn’t this included under this post?
Oh – I know – BECAUSE IT DOESN’T WORK!
I can see the red Google plus icon (g+1) on the right of the twitter icon both as a visitor and a logged-in user.
OK. I suppose you might be using Internet Explorer 7.0 (in Windows XP). I’ve just tried it and the icon does not show. It works for Chrome, Firefox and Internet Explorer 9.0.