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

Version Description

  • Better support for right-to-left (RTL) scripts/languages (Arabic, Persian, Urdu, Hebrew, Yiddish, Syriac, Thaana/Dhivehi, N'Ko, Chinese, Japanese)
Download this release

Release Info

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

Code changes from version 2.0 to 2.1

Files changed (2) hide show
  1. readme.txt +5 -1
  2. share-buttons-hupso.php +17 -2
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.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -22,6 +22,7 @@ Main features / advantages:
22
  * Very small and fast. The code for sharing button is very small (only a few KB), so share buttons will not slow down your website - even on devices with slow network connections.
23
  * All major social networks are supported.
24
  * Real-time button preview in admin settings
 
25
 
26
  Share Buttons are very easy to configure. Just select button type, size, position and which social networking services do you want to offer to your visitors.
27
  Button will apear below your articles or on top of them as you choose.
@@ -82,6 +83,9 @@ Yes. Thay are free and will always be free. And you do not need to open any acco
82
 
83
  == Changelog ==
84
 
 
 
 
85
  = 2.0 =
86
  * New button type: share toolbar
87
  * Real-time button preview in admin settings
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.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
22
  * Very small and fast. The code for sharing button is very small (only a few KB), so share buttons will not slow down your website - even on devices with slow network connections.
23
  * All major social networks are supported.
24
  * Real-time button preview in admin settings
25
+ * Support for right-to-left (RTL) scripts/languages (Arabic, Persian, Urdu, Hebrew, Yiddish, Syriac, Thaana/Dhivehi, N'Ko, Chinese, Japanese)
26
 
27
  Share Buttons are very easy to configure. Just select button type, size, position and which social networking services do you want to offer to your visitors.
28
  Button will apear below your articles or on top of them as you choose.
83
 
84
  == Changelog ==
85
 
86
+ = 2.1 =
87
+ * Better support for right-to-left (RTL) scripts/languages (Arabic, Persian, Urdu, Hebrew, Yiddish, Syriac, Thaana/Dhivehi, N'Ko, Chinese, Japanese)
88
+
89
  = 2.0 =
90
  * New button type: share toolbar
91
  * Real-time button preview in admin settings
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.0
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -324,7 +324,7 @@ function hupso_admin_settings_save() {
324
 
325
  function hupso_the_content( $content ) {
326
 
327
- global $hupso_plugin_url;
328
 
329
  /* Do not show share buttons in feeds */
330
  if ( is_feed() ) {
@@ -374,6 +374,21 @@ function hupso_the_content( $content ) {
374
  $button_type = 'share_toolbar';
375
  }
376
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
377
 
378
  if ( ( is_home() && $hupso_show_frontpage == 1 ) || ( is_archive() && $hupso_show_category == 1 ) ) {
379
 
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.1
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
324
 
325
  function hupso_the_content( $content ) {
326
 
327
+ global $hupso_plugin_url, $wp_version;
328
 
329
  /* Do not show share buttons in feeds */
330
  if ( is_feed() ) {
374
  $button_type = 'share_toolbar';
375
  }
376
 
377
+ /* Check for RTL language */
378
+ $rtl = false;
379
+ if ( version_compare($wp_version, '3.0', '<' ) ) {
380
+ if ( get_bloginfo('text_direction') == 'rtl' ) {
381
+ $rtl = true;
382
+ }
383
+ }
384
+ else {
385
+ $rtl = is_rtl();
386
+ }
387
+
388
+ if ( $rtl ) {
389
+ $code = str_replace( 'float:left', 'float:right', $code );
390
+ }
391
+
392
 
393
  if ( ( is_home() && $hupso_show_frontpage == 1 ) || ( is_archive() && $hupso_show_category == 1 ) ) {
394