Hupso Share Buttons for Twitter, Facebook & Google+ - Version 2.3

Version Description

  • Fixed diplay of excerpts (post summaries)
Download this release

Release Info

Developer kasal
Plugin Icon 128x128 Hupso Share Buttons for Twitter, Facebook & Google+
Version 2.3
Comparing to
See all releases

Code changes from version 2.2 to 2.3

Files changed (2) hide show
  1. readme.txt +4 -1
  2. share-buttons-hupso.php +18 -6
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.hupso.com/
4
  Tags: twitter, facebook, google+, social, sharing, stumbleupon, addthis, sharethis, sexybookmarks, addtoany, lockerz, shareaholic
5
  Requires at least: 2.8
6
  Tested up to: 3.4
7
- Stable tag: 2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -83,6 +83,9 @@ Yes. Thay are free and will always be free. And you do not need to open any acco
83
 
84
  == Changelog ==
85
 
 
 
 
86
  = 2.2 =
87
  * Fixed option to display share buttons inside categories and tags
88
 
4
  Tags: twitter, facebook, google+, social, sharing, stumbleupon, addthis, sharethis, sexybookmarks, addtoany, lockerz, shareaholic
5
  Requires at least: 2.8
6
  Tested up to: 3.4
7
+ Stable tag: 2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
83
 
84
  == Changelog ==
85
 
86
+ = 2.3 =
87
+ * Fixed diplay of excerpts (post summaries)
88
+
89
  = 2.2 =
90
  * Fixed option to display share buttons inside categories and tags
91
 
share-buttons-hupso.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Hupso Share Buttons for Twitter, Facebook & Google+
4
  Plugin URI: http://www.hupso.com/share
5
  Description: Add simple social sharing buttons to your articles. Your visitors will be able to easily share your content on the most popular social networks: Twitter, Facebook, Google Plus, Linkedin, StumbleUpon, Digg, Reddit, Bebo and Delicous. These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
6
- Version: 2.2
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -436,14 +436,26 @@ function hupso_the_content( $content ) {
436
  $code .= '<script type="text/javascript" src="' . $static_server . '"></script><!-- Hupso Share Buttons -->';
437
 
438
  $position = get_option( 'hupso_button_position', 'below' );
439
- if ($position == 'below')
440
- $new_content = $content . $code;
441
- else
 
 
 
 
 
 
 
 
 
 
 
442
  $new_content = $code . '<br/>' . $content;
443
-
 
444
 
445
  if ( $hupso_excerpt ) {
446
- $hupso_code = $new_content;
447
  return $content;
448
  }
449
  else {
3
  Plugin Name: Hupso Share Buttons for Twitter, Facebook & Google+
4
  Plugin URI: http://www.hupso.com/share
5
  Description: Add simple social sharing buttons to your articles. Your visitors will be able to easily share your content on the most popular social networks: Twitter, Facebook, Google Plus, Linkedin, StumbleUpon, Digg, Reddit, Bebo and Delicous. These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
6
+ Version: 2.3
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
436
  $code .= '<script type="text/javascript" src="' . $static_server . '"></script><!-- Hupso Share Buttons -->';
437
 
438
  $position = get_option( 'hupso_button_position', 'below' );
439
+
440
+ $excerpt = $GLOBALS['post']->post_excerpt;
441
+
442
+ if ( $position == 'below' ) {
443
+ $new_content = $content . $code;
444
+
445
+ if ( $excerpt != '' ) {
446
+ $new_excerpt = '<p>' . $excerpt . '</p>' . $code;
447
+ }
448
+ else {
449
+ $new_excerpt = $code;
450
+ }
451
+ }
452
+ else {
453
  $new_content = $code . '<br/>' . $content;
454
+ $new_excerpt = $code . '<br/>' . $excerpt;
455
+ }
456
 
457
  if ( $hupso_excerpt ) {
458
+ $hupso_code = $new_excerpt;
459
  return $content;
460
  }
461
  else {