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

Version Description

  • Bugfix: shortcodes can now be used without showing buttons under posts
Download this release

Release Info

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

Code changes from version 3.9.6 to 3.9.7

Files changed (2) hide show
  1. readme.txt +14 -10
  2. share-buttons-hupso.php +15 -6
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.hupso.com/
4
  Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, sexybookmarks, addtoany
5
  Requires at least: 2.8
6
  Tested up to: 3.5.1
7
- Stable tag: 3.9.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -24,7 +24,7 @@ These services are used by millions of people every day, so sharing your content
24
  * Social media counters: Twitter Tweet, Facebook Like, Google +1, Linkedin Share, Pinterest - Pin it
25
  * Compatible with all major web browsers: Firefox, Chrome, Internet Explorer, Safari, Opera.
26
  * Share toolbar works with desktop and mobile devices (mobile phones and tablets). Tested with PC, Apple iOS / iPhone / iPad and Google Android devices.
27
- * Real-time button preview in admin settings.
28
  * Support for right-to-left (RTL) scripts / languages (Arabic, Persian, Urdu, Hebrew, Yiddish, Syriac, Thaana/Dhivehi, N'Ko, Chinese, Japanese).
29
  * Hide or show buttons for specific posts / pages (see Shortcodes below)
30
  * Hide or show buttons for posts / pages / front page / categories
@@ -41,8 +41,7 @@ These services are used by millions of people every day, so sharing your content
41
  * Set background and border color for share button (menu)
42
  * Support for SSL (https)
43
 
44
-
45
- 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.
46
  Buttons will appear below your articles or on top of them (or both) as you choose.
47
 
48
  **Shortcodes**
@@ -90,17 +89,17 @@ Add CSS to your style.css file.
90
 
91
  For share buttons:
92
  `.hupso_pop > img {
93
- # add style rules here
94
  }`
95
 
96
  For share toolbar:
97
  `.hupso_toolbar > img {
98
- # add style rules here
99
  }`
100
 
101
  For counters:
102
  `.hupso_counters > img {
103
- # add style rules here
104
  }`
105
 
106
  = How do I change the margin of share button, share toolbar or counters? =
@@ -160,6 +159,8 @@ Hide share image (from settings) and add this CSS to your style.css file:
160
 
161
  Then adjust the values so that it looks great with your theme.
162
 
 
 
163
 
164
  = How can I show share buttons inside template files? =
165
 
@@ -179,9 +180,9 @@ Yes, you can. Just include `[hupso]` anywhere in widget text area and share butt
179
  Yes. Include this shortcodes anywhere inside post's text or inside text widget: `[hupso title="My title" url="http://www.hupso.com/share/"]`. Replace title and url with your title and your url.
180
  You can also set only one of the parameters like this: `[hupso title="My title"]` or like this `[hupso url="http://www.hupso.com/share/"]`.
181
 
182
- = Can I use my own social icons for Twitter, Facebook and other social networks? =
183
 
184
- Yes, you can. Enable this in Settings and follow instruction there.
185
 
186
  = How can I display share buttons only inside widget and not under posts? =
187
 
@@ -243,7 +244,10 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
243
 
244
  == Changelog ==
245
 
246
- = 3.9.6
 
 
 
247
  * support for SSL (https)
248
  * minor bug fixes
249
 
4
  Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, sexybookmarks, addtoany
5
  Requires at least: 2.8
6
  Tested up to: 3.5.1
7
+ Stable tag: 3.9.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
24
  * Social media counters: Twitter Tweet, Facebook Like, Google +1, Linkedin Share, Pinterest - Pin it
25
  * Compatible with all major web browsers: Firefox, Chrome, Internet Explorer, Safari, Opera.
26
  * Share toolbar works with desktop and mobile devices (mobile phones and tablets). Tested with PC, Apple iOS / iPhone / iPad and Google Android devices.
27
+ * Real-time button preview in admin settings. You will be able to see the preview of share buttons as you configure them.
28
  * Support for right-to-left (RTL) scripts / languages (Arabic, Persian, Urdu, Hebrew, Yiddish, Syriac, Thaana/Dhivehi, N'Ko, Chinese, Japanese).
29
  * Hide or show buttons for specific posts / pages (see Shortcodes below)
30
  * Hide or show buttons for posts / pages / front page / categories
41
  * Set background and border color for share button (menu)
42
  * Support for SSL (https)
43
 
44
+ 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.
 
45
  Buttons will appear below your articles or on top of them (or both) as you choose.
46
 
47
  **Shortcodes**
89
 
90
  For share buttons:
91
  `.hupso_pop > img {
92
+ /* add style rules here */
93
  }`
94
 
95
  For share toolbar:
96
  `.hupso_toolbar > img {
97
+ /* add style rules here */
98
  }`
99
 
100
  For counters:
101
  `.hupso_counters > img {
102
+ /* add style rules here */
103
  }`
104
 
105
  = How do I change the margin of share button, share toolbar or counters? =
159
 
160
  Then adjust the values so that it looks great with your theme.
161
 
162
+ = How can I use counters under posts and share toolbar in sidebar? =
163
+ You can use Hupso WP plugin for counters on top/bottom of every post and use raw HTML code for sidebar widget. Go to [Hupso Share Buttons homepage](http://www.hupso.com/share/) and generate HTML code for share buttons. In WP admin, go to Appearance->Widgets and create new text widget (drag and drop it to sidebar) and paste HTML code inside it.
164
 
165
  = How can I show share buttons inside template files? =
166
 
180
  Yes. Include this shortcodes anywhere inside post's text or inside text widget: `[hupso title="My title" url="http://www.hupso.com/share/"]`. Replace title and url with your title and your url.
181
  You can also set only one of the parameters like this: `[hupso title="My title"]` or like this `[hupso url="http://www.hupso.com/share/"]`.
182
 
183
+ = Can I replace/change/modify social icons (images) for Twitter, Facebook and other social networks? =
184
 
185
+ Yes, you can. Go to plugin settings. Change "Use custom social share icons" to "Yes, serve images from local Wordpress folder", then replace the icons inside plugin folder "img/services". You can also upload images to another web server or CDN ([read instructions](http://www.hupso.com/share/custom-social-icons.php)).
186
 
187
  = How can I display share buttons only inside widget and not under posts? =
188
 
244
 
245
  == Changelog ==
246
 
247
+ = 3.9.7 =
248
+ * Bugfix: shortcodes can now be used without showing buttons under posts
249
+
250
+ = 3.9.6 =
251
  * support for SSL (https)
252
  * minor bug fixes
253
 
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: 3.9.6
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -46,9 +46,9 @@ if ( ! function_exists( 'is_ssl' ) ) {
46
  }
47
 
48
 
49
- add_filter( 'the_content', 'hupso_the_content', 10 );
50
  add_filter( 'get_the_excerpt', 'hupso_get_the_excerpt', 1);
51
- add_filter( 'the_excerpt', 'hupso_the_content', 100 );
52
 
53
  load_plugin_textdomain( 'share_buttons_hupso', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
54
 
@@ -1127,11 +1127,16 @@ function hupso_the_widget( $content ) {
1127
  return hupso_the_content ( $content );
1128
  }
1129
 
 
 
 
 
 
 
1130
  function hupso_the_content( $content ) {
1131
 
1132
  global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p;
1133
 
1134
-
1135
  if ($HUPSO_SHOW == false) {
1136
  $content = str_ireplace('[hupso_hide]', '', $content);
1137
  $content = str_ireplace('[hupso]', '', $content);
@@ -1168,7 +1173,6 @@ function hupso_the_content( $content ) {
1168
  }
1169
  }
1170
 
1171
-
1172
  $hupso_show_search = get_option( 'hupso_show_search' , '1' );
1173
  if ( ($hupso_state == 'normal') && (is_search()) && ($hupso_show_search != 1) ) {
1174
  $content = str_ireplace('[hupso_hide]', '', $content);
@@ -1208,7 +1212,12 @@ function hupso_the_content( $content ) {
1208
 
1209
  /* Check if we are inside category where buttons are hidden */
1210
  $cats = get_the_category();
1211
- $current_category = @$cats[0]->slug;
 
 
 
 
 
1212
  $hupso_hide_categories = get_option( 'hupso_hide_categories' , array() );
1213
  if ( $hupso_hide_categories == '' ) {
1214
  $hupso_hide_categories = array();
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: 3.9.7
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
46
  }
47
 
48
 
49
+ add_filter( 'the_content', 'hupso_the_content_normal', 10 );
50
  add_filter( 'get_the_excerpt', 'hupso_get_the_excerpt', 1);
51
+ add_filter( 'the_excerpt', 'hupso_the_content_normal', 100 );
52
 
53
  load_plugin_textdomain( 'share_buttons_hupso', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
54
 
1127
  return hupso_the_content ( $content );
1128
  }
1129
 
1130
+ function hupso_the_content_normal( $content ) {
1131
+ global $hupso_state;
1132
+ $hupso_state = 'normal';
1133
+ return hupso_the_content( $content );
1134
+ }
1135
+
1136
  function hupso_the_content( $content ) {
1137
 
1138
  global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p;
1139
 
 
1140
  if ($HUPSO_SHOW == false) {
1141
  $content = str_ireplace('[hupso_hide]', '', $content);
1142
  $content = str_ireplace('[hupso]', '', $content);
1173
  }
1174
  }
1175
 
 
1176
  $hupso_show_search = get_option( 'hupso_show_search' , '1' );
1177
  if ( ($hupso_state == 'normal') && (is_search()) && ($hupso_show_search != 1) ) {
1178
  $content = str_ireplace('[hupso_hide]', '', $content);
1212
 
1213
  /* Check if we are inside category where buttons are hidden */
1214
  $cats = get_the_category();
1215
+ if (isset($cats[0])) {
1216
+ $current_category = @$cats[0]->slug;
1217
+ }
1218
+ else {
1219
+ $current_category = '';
1220
+ }
1221
  $hupso_hide_categories = get_option( 'hupso_hide_categories' , array() );
1222
  if ( $hupso_hide_categories == '' ) {
1223
  $hupso_hide_categories = array();