Skip to content
All gists
Back to GitHub
Sign in
Sign up
Sign in
Sign up
{{ message }}
Instantly share code, notes, and snippets.
yuya-takeyama
/
wp-social-bookmarking-light.patch
Created
November 13, 2010 06:59
Star
0
Fork
0
Star
Code
Revisions
1
Embed
What would you like to do?
Embed
Embed this gist in your website.
Share
Copy sharable link for this gist.
Clone via HTTPS
Clone with Git or checkout with SVN using the repository’s web address.
Learn more about clone URLs
Download ZIP
A patch makes WP Social Bookmarking Light visible on top page.
Raw
wp-social-bookmarking-light.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
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
You can’t perform that action at this time.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.