Skip to content

Instantly share code, notes, and snippets.

@yuya-takeyama
Created November 13, 2010 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuya-takeyama/675159 to your computer and use it in GitHub Desktop.
Save yuya-takeyama/675159 to your computer and use it in GitHub Desktop.
A patch makes WP Social Bookmarking Light visible on top page.
diff --git a/public_html/wp-content/plugins/wp-social-bookmarking-light/wp-social-bookmarking-light.php b/public_html/wp-content/plugins/wp-social-bookmarkin
index 6c08727..d9bbba5 100644
--- a/public_html/wp-content/plugins/wp-social-bookmarking-light/wp-social-bookmarking-light.php
+++ b/public_html/wp-content/plugins/wp-social-bookmarking-light/wp-social-bookmarking-light.php
@@ -123,8 +123,12 @@ class WpSocialBookmarkingLight
*/
function twitter()
{
- return $this->link_raw( '<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>'
- .'<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>' );
+ return $this->link_raw( '<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"'
+ ." data-url=\"{$this->url}\""
+ ." data-text=\"{$this->title}\""
+ .' data-via="YOUR_TWITTER_ACCOUNT"'
+ .'>Tweet</a>'
+ .'<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>' );
}
/**
@@ -492,7 +496,7 @@ function wp_social_bookmarking_light_the_content( $content )
}
$options = wp_social_bookmarking_light_options();
- if( $options['single_page'] && !is_singular() ){
+ if( $options['single_page'] && !is_singular() && !is_home() ){
return $content;
}
if( !$options['is_page'] && is_page() ){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment