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

Version Description

  • Improved HTTPS/SSL support (Fix for Preview in Plugin Settings)
  • Compatible with Wordpress 4.7.5
Download this release

Release Info

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

Code changes from version 4.1.1 to 4.1.2

Files changed (3) hide show
  1. js/create_button.js +25 -18
  2. readme.txt +10 -3
  3. share-buttons-hupso.php +2 -2
js/create_button.js CHANGED
@@ -39,6 +39,7 @@ function hupso_create_code() {
39
  var hupso_custom_icons = 'no';
40
  var hupso_email_button = '0';
41
  var hupso_print_button = '0';
 
42
 
43
  dir = "";
44
  cdn = "static";
@@ -123,14 +124,14 @@ function hupso_create_code() {
123
  switch ( share_image ) {
124
  case 'show':
125
  if ( (lang_code == 'en') || (lang_code == '')) {
126
- counters_preview = '<img src="http://static.hupso.com/share/buttons/share-small.png"/>';
127
  }
128
  else {
129
- counters_preview = '<img style="margin-right:10px;" src="http://static.hupso.com/share/buttons/lang/'+lang_code+'/share-small.png"/>';
130
  }
131
  break;
132
  case 'hide':
133
- counters_preview = '<img src="http://static.hupso.com/share/buttons/dot.png"/>';
134
  break;
135
  case 'custom':
136
  counters_preview = '<img src="' + share_image_custom_url + '"/>';
@@ -182,7 +183,7 @@ function hupso_create_code() {
182
  var twitter_tweet = $("input:checkbox[name=twitter_tweet]:checked").val();
183
  if (twitter_tweet == 1) {
184
  hupso_services += '"twitter"';
185
- counters_preview += '<img src="http://static.hupso.com/share/img/counters/twitter_tweet.png" />';
186
  }
187
 
188
  // facebook
@@ -190,10 +191,10 @@ function hupso_create_code() {
190
  var facebook_send = $("input:checkbox[name=facebook_send]:checked").val();
191
  if (facebook_like == 1) {
192
  hupso_services += '"facebook_like"';
193
- counters_preview += '<span style="padding-left:20px;"><img src="http://static.hupso.com/share/img/counters/facebook_like.png" /></span>';
194
  if (facebook_send == 1) {
195
  hupso_services += '"facebook_send"';
196
- counters_preview += ' <img src="http://static.hupso.com/share/img/counters/facebook_send.png" />';
197
  }
198
  }
199
 
@@ -201,35 +202,35 @@ function hupso_create_code() {
201
  var google_plus_one = $("input:checkbox[name=google_plus_one]:checked").val();
202
  if (google_plus_one == 1) {
203
  hupso_services += '"google"';
204
- counters_preview += '<span style="padding-left:20px;"><img src="http://static.hupso.com/share/img/counters/google_plus_one.png" /></span>';
205
  }
206
 
207
  // pinterest
208
  var pinterest_pin = $("input:checkbox[name=pinterest_pin]:checked").val();
209
  if (pinterest_pin == 1) {
210
  hupso_services += '"pinterest"';
211
- counters_preview += '<span style="padding-left:20px;"><img src="http://static.hupso.com/share/buttons/PinExt.png" /></span>';
212
  }
213
 
214
  // email button
215
  var hupso_email_button = $("input:checkbox[name=email_button]:checked").val();
216
  if (hupso_email_button == 1) {
217
  hupso_services += '"email"';
218
- counters_preview += '<span style="padding-left:20px;"><img src="http://static.hupso.com/share/img/services/email-button.png" /></span>';
219
  }
220
 
221
  // print button
222
  var hupso_print_button = $("input:checkbox[name=print_button]:checked").val();
223
  if (hupso_print_button == 1) {
224
  hupso_services += '"print"';
225
- counters_preview += '<span style="padding-left:20px;"><img src="http://static.hupso.com/share/img/services/print-button.png" /></span>';
226
  }
227
 
228
  // linkedin
229
  var linkedin_share = $("input:checkbox[name=linkedin_share]:checked").val();
230
  if (linkedin_share == 1) {
231
  hupso_services += '"linkedin"';
232
- counters_preview += '<span style="padding-left:20px;"><img src="http://static.hupso.com/share/img/counters/linkedin_share.png" /></span>';
233
  }
234
 
235
  hupso_services = hupso_services.replace(/""/gi, '","');
@@ -296,8 +297,14 @@ function hupso_create_code() {
296
  }
297
 
298
  if (hupso_url != "") {
299
- if (hupso_url.toLowerCase().indexOf( "http://" ) == -1 )
 
 
 
 
 
300
  hupso_url = "http://" + hupso_url;
 
301
 
302
  switch ( button_type ) {
303
  case 'share_button':
@@ -407,13 +414,13 @@ function hupso_create_code() {
407
  hupso_js = 'counters.js';
408
  }
409
 
410
- var code = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ -->';
411
- code += '<a class="'+hupso_class+'" href="http://www.hupso.com/share/">'; // float: class="hupso_float"
412
 
413
  switch ( button_type ) {
414
  case 'share_button':
415
  if (bsize != 'custom') {
416
- code += '<img src="http://static.hupso.com/share/buttons/'+bsize+'.png" style="border:0px; width:'+bwidth+'; height: '+bheight+'; " alt="Share Button" />';
417
  }
418
  else {
419
  code += '<img src="'+hupso_button_image_custom_url+'" style="border:0px" alt="Share" />';
@@ -428,7 +435,7 @@ function hupso_create_code() {
428
  code += '<img src="' + share_image_custom_url + '" style="border:0px; padding-top:5px; float:left; padding-right:5px;" alt="Share Button"/>';
429
  }
430
  else {
431
- code += '<img src="http://static.hupso.com/share/buttons/'+share_image_lang+toolbar_share+'.png" style="border:0px; padding-top:5px; float:left;" alt="Share Button"/>';
432
  }
433
  break;
434
  case 'counters':
@@ -441,7 +448,7 @@ function hupso_create_code() {
441
  code += '<img src="' + share_image_custom_url + '" style="border:0px; padding-top:5px; float:left; padding-right:5px;" alt="Share Button"/>';
442
  }
443
  else {
444
- code += '<img src="http://static.hupso.com/share/buttons/'+share_image_lang + share_url + '.png" style="border:0px; padding-top:2px; float:left;" alt="Share Button"/>';
445
  }
446
 
447
  break;
@@ -484,7 +491,7 @@ function hupso_create_code() {
484
  $("input[name=code]").val(code);
485
 
486
  code += '</script>';
487
- code += '<script type="text/javascript" src="http://'+cdn+'.hupso.com/share/js/'+dir+hupso_js+'"></script>';
488
  code += "<!-- Hupso Share Buttons -->";
489
 
490
  // remove float code
39
  var hupso_custom_icons = 'no';
40
  var hupso_email_button = '0';
41
  var hupso_print_button = '0';
42
+ var prot = location.protocol;
43
 
44
  dir = "";
45
  cdn = "static";
124
  switch ( share_image ) {
125
  case 'show':
126
  if ( (lang_code == 'en') || (lang_code == '')) {
127
+ counters_preview = '<img src="' + prot + '//static.hupso.com/share/buttons/share-small.png"/>';
128
  }
129
  else {
130
+ counters_preview = '<img style="margin-right:10px;" src="' + prot + '//static.hupso.com/share/buttons/lang/'+lang_code+'/share-small.png"/>';
131
  }
132
  break;
133
  case 'hide':
134
+ counters_preview = '<img src="' + prot + '//static.hupso.com/share/buttons/dot.png"/>';
135
  break;
136
  case 'custom':
137
  counters_preview = '<img src="' + share_image_custom_url + '"/>';
183
  var twitter_tweet = $("input:checkbox[name=twitter_tweet]:checked").val();
184
  if (twitter_tweet == 1) {
185
  hupso_services += '"twitter"';
186
+ counters_preview += '<img src="' + prot + '//static.hupso.com/share/img/counters/twitter_tweet.png" />';
187
  }
188
 
189
  // facebook
191
  var facebook_send = $("input:checkbox[name=facebook_send]:checked").val();
192
  if (facebook_like == 1) {
193
  hupso_services += '"facebook_like"';
194
+ counters_preview += '<span style="padding-left:20px;"><img src="' + prot + '//static.hupso.com/share/img/counters/facebook_like.png" /></span>';
195
  if (facebook_send == 1) {
196
  hupso_services += '"facebook_send"';
197
+ counters_preview += ' <img src="' + prot + '//static.hupso.com/share/img/counters/facebook_send.png" />';
198
  }
199
  }
200
 
202
  var google_plus_one = $("input:checkbox[name=google_plus_one]:checked").val();
203
  if (google_plus_one == 1) {
204
  hupso_services += '"google"';
205
+ counters_preview += '<span style="padding-left:20px;"><img src="' + prot + '//static.hupso.com/share/img/counters/google_plus_one.png" /></span>';
206
  }
207
 
208
  // pinterest
209
  var pinterest_pin = $("input:checkbox[name=pinterest_pin]:checked").val();
210
  if (pinterest_pin == 1) {
211
  hupso_services += '"pinterest"';
212
+ counters_preview += '<span style="padding-left:20px;"><img src="' + prot + '//static.hupso.com/share/buttons/PinExt.png" /></span>';
213
  }
214
 
215
  // email button
216
  var hupso_email_button = $("input:checkbox[name=email_button]:checked").val();
217
  if (hupso_email_button == 1) {
218
  hupso_services += '"email"';
219
+ counters_preview += '<span style="padding-left:20px;"><img src="' + prot + '//static.hupso.com/share/img/services/email-button.png" /></span>';
220
  }
221
 
222
  // print button
223
  var hupso_print_button = $("input:checkbox[name=print_button]:checked").val();
224
  if (hupso_print_button == 1) {
225
  hupso_services += '"print"';
226
+ counters_preview += '<span style="padding-left:20px;"><img src="' + prot + '//static.hupso.com/share/img/services/print-button.png" /></span>';
227
  }
228
 
229
  // linkedin
230
  var linkedin_share = $("input:checkbox[name=linkedin_share]:checked").val();
231
  if (linkedin_share == 1) {
232
  hupso_services += '"linkedin"';
233
+ counters_preview += '<span style="padding-left:20px;"><img src="' + prot + '//static.hupso.com/share/img/counters/linkedin_share.png" /></span>';
234
  }
235
 
236
  hupso_services = hupso_services.replace(/""/gi, '","');
297
  }
298
 
299
  if (hupso_url != "") {
300
+ if (prot == 'https:') {
301
+ if (hupso_url.toLowerCase().indexOf( "https://" ) == -1 )
302
+ hupso_url = "https://" + hupso_url;
303
+ }
304
+ else {
305
+ if (hupso_url.toLowerCase().indexOf( "http://" ) == -1 )
306
  hupso_url = "http://" + hupso_url;
307
+ }
308
 
309
  switch ( button_type ) {
310
  case 'share_button':
414
  hupso_js = 'counters.js';
415
  }
416
 
417
+ var code = '<!-- Hupso Share Buttons - https://www.hupso.com/share/ -->';
418
+ code += '<a class="'+hupso_class+'" href="https://www.hupso.com/share/">'; // float: class="hupso_float"
419
 
420
  switch ( button_type ) {
421
  case 'share_button':
422
  if (bsize != 'custom') {
423
+ code += '<img src="' + prot + '//static.hupso.com/share/buttons/'+bsize+'.png" style="border:0px; width:'+bwidth+'; height: '+bheight+'; " alt="Share Button" />';
424
  }
425
  else {
426
  code += '<img src="'+hupso_button_image_custom_url+'" style="border:0px" alt="Share" />';
435
  code += '<img src="' + share_image_custom_url + '" style="border:0px; padding-top:5px; float:left; padding-right:5px;" alt="Share Button"/>';
436
  }
437
  else {
438
+ code += '<img src="' + prot + '//static.hupso.com/share/buttons/'+share_image_lang+toolbar_share+'.png" style="border:0px; padding-top:5px; float:left;" alt="Share Button"/>';
439
  }
440
  break;
441
  case 'counters':
448
  code += '<img src="' + share_image_custom_url + '" style="border:0px; padding-top:5px; float:left; padding-right:5px;" alt="Share Button"/>';
449
  }
450
  else {
451
+ code += '<img src="' + prot + '//static.hupso.com/share/buttons/'+share_image_lang + share_url + '.png" style="border:0px; padding-top:2px; float:left;" alt="Share Button"/>';
452
  }
453
 
454
  break;
491
  $("input[name=code]").val(code);
492
 
493
  code += '</script>';
494
+ code += '<script type="text/javascript" src="' + prot + '//'+cdn+'.hupso.com/share/js/'+dir+hupso_js+'"></script>';
495
  code += "<!-- Hupso Share Buttons -->";
496
 
497
  // remove float code
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: kasal
3
  Donate link: http://www.hupso.com/
4
  Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, addtoany, sexybookmarks, pinterest, print, tumblr, bebo, social media, social buttons, social share, email, print button, social plugin, social widget, email button, post, vkontakte, vk.com, reddit, delicous, del.icio.us, linkedin, tumblr, pinterest, stumbleupon, digg, stumble upon, pinterest button, tweet, like, share, sharing, shortcode, button, page
5
  Requires at least: 2.9
6
- Tested up to: 4.7.3
7
- Stable tag: 4.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -16,6 +16,8 @@ Add simple social share buttons to your posts or pages. Your visitors will be ab
16
 
17
  These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
18
 
 
 
19
  **Main features / advantages**
20
 
21
  * Keep Facebook likes when switching your website from http to https protocol
@@ -62,10 +64,11 @@ You can configure share buttons in plugin settings.
62
  **Translations**
63
 
64
  Plugin is currently translated into: French, Czech, Polish, Arabic, Traditional Chinese, Simplified Chinese and Dutch (Nederlands / Belgium).
 
65
  If you would like to translate into your language, send message [here](http://www.hupso.com/share/feedback/).
66
 
67
 
68
- [Share Buttons Demo](http://www.hupso.com/share/) | [FAQ](http://wordpress.org/extend/plugins/hupso-share-buttons-for-twitter-facebook-google/faq/) | [Feedback](http://www.hupso.com/share/feedback/)
69
 
70
 
71
  == Installation ==
@@ -306,6 +309,10 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
306
 
307
  == Changelog ==
308
 
 
 
 
 
309
  = 4.1.1 =
310
  * Improved support to keep old Facebook likes
311
  * Improved compatibility with some themes
3
  Donate link: http://www.hupso.com/
4
  Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, addtoany, sexybookmarks, pinterest, print, tumblr, bebo, social media, social buttons, social share, email, print button, social plugin, social widget, email button, post, vkontakte, vk.com, reddit, delicous, del.icio.us, linkedin, tumblr, pinterest, stumbleupon, digg, stumble upon, pinterest button, tweet, like, share, sharing, shortcode, button, page
5
  Requires at least: 2.9
6
+ Tested up to: 4.7.5
7
+ Stable tag: 4.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
16
 
17
  These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
18
 
19
+ [Screenshots](https://wordpress.org/plugins/hupso-share-buttons-for-twitter-facebook-google/#screenshots)
20
+
21
  **Main features / advantages**
22
 
23
  * Keep Facebook likes when switching your website from http to https protocol
64
  **Translations**
65
 
66
  Plugin is currently translated into: French, Czech, Polish, Arabic, Traditional Chinese, Simplified Chinese and Dutch (Nederlands / Belgium).
67
+
68
  If you would like to translate into your language, send message [here](http://www.hupso.com/share/feedback/).
69
 
70
 
71
+ [Share Buttons Demo](http://www.hupso.com/share/) | [Screenshots](https://wordpress.org/plugins/hupso-share-buttons-for-twitter-facebook-google/#screenshots) | [FAQ](http://wordpress.org/extend/plugins/hupso-share-buttons-for-twitter-facebook-google/faq/) | [Privacy](http://www.hupso.com/privacy) | [Feedback](http://www.hupso.com/share/feedback/)
72
 
73
 
74
  == Installation ==
309
 
310
  == Changelog ==
311
 
312
+ = 4.1.2 =
313
+ * Improved HTTPS/SSL support (Fix for Preview in Plugin Settings)
314
+ * Compatible with Wordpress 4.7.5
315
+
316
  = 4.1.1 =
317
  * Improved support to keep old Facebook likes
318
  * Improved compatibility with some themes
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 share 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, Tumblr, Pinterest, StumbleUpon, Digg, Reddit, Bebo, VKontakte 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: 4.1.1
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -12,7 +12,7 @@ Domain Path: /languages
12
  */
13
 
14
  global $HUPSO_VERSION;
15
- $HUPSO_VERSION = '4.1.1';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
3
  Plugin Name: Hupso Share Buttons for Twitter, Facebook & Google+
4
  Plugin URI: http://www.hupso.com/share/
5
  Description: Add simple social share 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, Tumblr, Pinterest, StumbleUpon, Digg, Reddit, Bebo, VKontakte 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: 4.1.2
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
13
 
14
  global $HUPSO_VERSION;
15
+ $HUPSO_VERSION = '4.1.2';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';