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

Version Description

  • Shortcodes with custom urls are now working properly (example: [hupso url="http://www.yahoo.com"])
Download this release

Release Info

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

Code changes from version 3.9.24 to 3.9.25

Files changed (2) hide show
  1. readme.txt +18 -5
  2. share-buttons-hupso.php +73 -48
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Hupso Share Buttons for Twitter, Facebook & Google+ ===
2
  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, sexybookmarks, addtoany, multisite, pinterest, print, tumblr, bebo
5
  Requires at least: 2.8
6
- Tested up to: 3.7.1
7
- Stable tag: 3.9.24
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -86,7 +86,7 @@ Yes. Thay are free and will always be free. And you do not need to open any acco
86
 
87
  = Are share buttons using Javascript? =
88
 
89
- Yes. Javascript is required for sharing buttons to function properly and it must be enabled. Counters load javascript code from Twitter, Facebook, Google, Linkedin, Pinterest or from other social services that are selected. Interface for share buttons is loaded from our servers via javascript at run-time. This enables us to add minor enhancements and fix browser bugs the moment they are discovered without forcing you to upgrade the plugin all the time. Some button images are loaded from your local Wordpress installation and some from our servers.
90
 
91
  = How can I hide/show share buttons for specific posts? =
92
 
@@ -240,6 +240,16 @@ It is missing if your site is running from localhost. It will work when you move
240
 
241
  Yes, you can. Enter your website root under "Custom url" in Settings. After that counters will show sharing stats for your whole website, not for each page individually.
242
 
 
 
 
 
 
 
 
 
 
 
243
  = Buttons are not working properly. What can I do? =
244
 
245
  Please upgrade the plugin to the latest version. If that does not help then try to reinstall the plugin (uninstall it and install it again).
@@ -286,6 +296,9 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
286
 
287
  == Changelog ==
288
 
 
 
 
289
  = 3.9.24 =
290
  * Added Dutch (Nederlands / Belgium) translation
291
 
@@ -317,7 +330,7 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
317
  * Better Pinterest dialog for selecting images
318
 
319
  = 3.9.16 =
320
- * Included hupso.pot file for translation. If you would like to translate into your language, send message [here](http://www.hupso.com/share/feedback/).
321
  * Added Czech translation
322
 
323
  = 3.9.15 =
1
  === Hupso Share Buttons for Twitter, Facebook & Google+ ===
2
  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, sexybookmarks, addtoany, multisite, pinterest, print, tumblr, bebo, social media
5
  Requires at least: 2.8
6
+ Tested up to: 3.9.1
7
+ Stable tag: 3.9.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
86
 
87
  = Are share buttons using Javascript? =
88
 
89
+ Yes. Javascript is required for sharing buttons to function properly and it must be enabled. Counters load javascript code from Twitter, Facebook, Google, Linkedin, Pinterest or from other social services that are selected. Interface for share buttons is loaded from our servers via javascript at run-time. This enables us to add minor enhancements and fix browser bugs the moment they are discovered without forcing you to upgrade the plugin all the time. Some button images are loaded from your local Wordpress installation and some from our servers. Clicks on share icons can be redirected to target social network throught our servers. One of the benefits of such setup is that share buttons keep working properly, even when there are API changes at social networking sites. This can be a major advantage for websites that do not plan to update plugins regularly.
90
 
91
  = How can I hide/show share buttons for specific posts? =
92
 
240
 
241
  Yes, you can. Enter your website root under "Custom url" in Settings. After that counters will show sharing stats for your whole website, not for each page individually.
242
 
243
+ = Email button does not seem to work on some devices. Nothing happens when I click on it. What can I do? =
244
+
245
+ Clicking on e-mail button invokes default e-mail application on the device. If default e-mail application is not set up, it will not do anything.
246
+ On Firefox and Chrome you can use web based e-mail (such as gmail.com or outlook.com) as your default e-mail application if you like, so
247
+ clicking on the email icons will open your web based e-mail account.
248
+
249
+ [Firefox instructions](https://support.mozilla.org/en-US/kb/change-program-used-open-email-links)
250
+
251
+ [Chrome instructions](https://support.google.com/chrome/answer/1382847?hl=en#content)
252
+
253
  = Buttons are not working properly. What can I do? =
254
 
255
  Please upgrade the plugin to the latest version. If that does not help then try to reinstall the plugin (uninstall it and install it again).
296
 
297
  == Changelog ==
298
 
299
+ = 3.9.25 =
300
+ * Shortcodes with custom urls are now working properly (example: [hupso url="http://www.yahoo.com"])
301
+
302
  = 3.9.24 =
303
  * Added Dutch (Nederlands / Belgium) translation
304
 
330
  * Better Pinterest dialog for selecting images
331
 
332
  = 3.9.16 =
333
+ * media6degrees.com).
334
  * Added Czech translation
335
 
336
  = 3.9.15 =
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, 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: 3.9.24
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 = '3.9.24';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
@@ -70,6 +70,7 @@ $hupso_default_services = array(
70
  add_action('widgets_init', 'hupso_widget_init');
71
  add_shortcode( 'hupso', 'hupso_shortcodes' );
72
 
 
73
  /* Use shortcodes in text widgets */
74
  $hupso_widget_text = get_option( 'hupso_widget_text', '1');
75
  if ( $hupso_widget_text == '1' ) {
@@ -96,15 +97,15 @@ function hupso_widget_init() {
96
  }
97
 
98
  function hupso_shortcodes( $atts ) {
99
- global $hupso_state, $hupso_shortcode_params;
100
- $hupso_state = 'shortcodes';
101
- if ($atts == '') {
102
- return hupso_the_content_shortcodes('');
103
- }
104
- else {
105
- $hupso_shortcode_params = $atts;
106
- return hupso_the_content_shortcodes('');
107
- }
108
  }
109
 
110
  if ( function_exists('register_activation_hook') )
@@ -308,6 +309,7 @@ function hupso_admin_settings_show() {
308
  echo '<p><b>' . __('Shortcodes', 'hupso') . '</b></p>';
309
  echo '<p>Use <b>[hupso_hide]</b> anywhere in post\'s text to hide buttons for specific post.</p>';
310
  echo '<p>Use <b>[hupso]</b> anywhere in post\'s text to show buttons for specific post at custom position.</p>';
 
311
  echo '<p>Use <b>Hupso Share Buttons Widget</b> to show share buttons in sidebar or footer.</p>';
312
  echo '<p>Use <b>echo do_shortcode( \'[hupso]\' ); </b> to show share buttons anywhere inside template files.</p>';
313
  echo '<p>Use <b>global $HUPSO_SHOW; $HUPSO_SHOW = false;</b> to hide share buttons inside template files. Make sure you do this before div id="content". This will hide the buttons in content. Share buttons will still show in widget (if used).</p>';
@@ -324,6 +326,11 @@ function hupso_admin_settings_show() {
324
  echo '<p><b>Generic HTML code</b></p>';
325
  echo '<p>If you need generic HTML code for Hupso Share Buttons to use in HTML documents or inside other CMS, you can <a href="http://www.hupso.com/share/" target="_blank">generate the code here</a>.</p>';
326
  echo '</div>';
 
 
 
 
 
327
 
328
  echo '</div>';
329
 
@@ -404,7 +411,7 @@ function hupso_admin_settings_show() {
404
  <tr><td><input type="radio" name="size" value="button100x23" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button100_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_100_img ?></td></tr>
405
  <tr><td><input type="radio" name="size" value="button120x28" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button120_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_120_img ?></td></tr>
406
  <tr><td><input type="radio" name="size" value="button160x37" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button160_checked; ?>/></td><td style="padding-right:20px;"><?php echo $button_160_img ?></td></tr>
407
- <tr><td><input type="radio" name="size" value="custom" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $share_button_custom_checked; ?> /></td><td style="padding-left:10px;"><?php _e('Custom image from URL', 'hupso'); ?>: <input type="text" name="hupso_button_image_custom_url" onchange="create_code()" style="width:300px;" value="<?php echo $hupso_button_image_custom_url; ?>"/><br/> See <a href="http://www.hupso.com/share/gallery.php" target="_blank">gallery of custom share buttons</a>.</td></tr> </td></tr>
408
  </table>
409
  <hr style="height:1px; width:500px;"/>
410
  </td>
@@ -1237,7 +1244,6 @@ function hupso_admin_settings_save() {
1237
  /* save custom post types */
1238
  $args = array(
1239
  'public' => true,
1240
-
1241
  '_builtin' => false
1242
  );
1243
  $output = 'names'; // names or objects, note names is the default
@@ -1274,6 +1280,7 @@ function hupso_the_excerpt( $content ) {
1274
  global $hupso_state, $post;
1275
  $hupso_state = 'normal';
1276
 
 
1277
  $hupso_show_excerpts = get_option( 'hupso_show_excerpts' , '1' );
1278
  if ( ( $hupso_show_excerpts == 1 ) && ( $post->post_type != 'attachment' ) ) {
1279
  return hupso_the_content ( $content );
@@ -1285,8 +1292,8 @@ function hupso_the_excerpt( $content ) {
1285
 
1286
  function hupso_the_content_shortcodes( $content ) {
1287
  global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p, $post;
1288
- global $post_url, $post_title;
1289
-
1290
  $value = '';
1291
  $hupso_meta_box = get_option( 'hupso_meta_box', '' );
1292
  if ($hupso_meta_box != "1") {
@@ -1313,8 +1320,16 @@ function hupso_the_content_shortcodes( $content ) {
1313
  }
1314
 
1315
  $post_url = ( isset($GLOBALS['post']) ? get_permalink($GLOBALS['post']->ID) : get_permalink() );
1316
- $post_title = ( isset( $GLOBALS['post'] ) ? $GLOBALS['post']->post_title : '' );
 
 
 
 
1317
 
 
 
 
 
1318
 
1319
  /* Check if we are inside category where buttons are hidden */
1320
  $cats = get_the_category();
@@ -1407,24 +1422,25 @@ function hupso_the_content_shortcodes( $content ) {
1407
  }
1408
 
1409
 
1410
- /* Shortcode param */
1411
- if ( ($hupso_shortcode_params != '') && ($h_url != '') ) {
1412
- $new_url = $h_url;
1413
- }
1414
-
1415
  $new_url = $post_url;
 
1416
 
1417
- switch ( $button_type ) {
1418
- case 'share_button':
1419
- $code .= 'var hupso_url="' . $new_url . '";';
1420
- break;
1421
- case 'share_toolbar':
1422
- $code .= 'var hupso_url_t="' . $new_url . '";';
1423
- break;
1424
- case 'counters':
1425
- $code .= 'var hupso_url_c="' . $new_url . '";';
1426
- break;
1427
- }
1428
 
1429
 
1430
 
@@ -1511,13 +1527,18 @@ function hupso_the_content_shortcodes( $content ) {
1511
  }
1512
  }
1513
 
 
1514
  return $new_content;
1515
  }
1516
 
1517
  function hupso_the_content( $content ) {
1518
 
1519
  global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p, $post;
1520
-
 
 
 
 
1521
  $value = '';
1522
  $hupso_meta_box = get_option( 'hupso_meta_box', '' );
1523
  if ($hupso_meta_box != "1") {
@@ -1664,7 +1685,7 @@ function hupso_the_content( $content ) {
1664
  $hupso_twitter_via = get_option( 'hupso_twitter_via', '' );
1665
  $hupso_counters_lang = get_option( 'hupso_counters_lang', 'en_US' );
1666
 
1667
- $post_url = ( isset($GLOBALS['post']) ? get_permalink($GLOBALS['post']->ID) : get_permalink() );
1668
  $post_title = ( isset( $GLOBALS['post'] ) ? $GLOBALS['post']->post_title : '' );
1669
 
1670
  if ( ( $hupso_state == 'widget' ) || ( $hupso_state == 'shortcodes' ) ) {
@@ -1751,6 +1772,8 @@ function hupso_the_content( $content ) {
1751
  }
1752
  }
1753
 
 
 
1754
  if ( ( is_home() && $hupso_show_frontpage == 1 ) || ( is_archive() && $hupso_show_category == 1 ) || ( $hupso_shortcode_params != '' ) ) {
1755
  if ( $hupso_page_url != '' ) {
1756
  $new_url = $hupso_page_url;
@@ -1763,21 +1786,22 @@ function hupso_the_content( $content ) {
1763
  if ( ($hupso_shortcode_params != '') && ($h_url != '') ) {
1764
  $new_url = $h_url;
1765
  }
1766
-
1767
- switch ( $button_type ) {
1768
- case 'share_button':
1769
- $code .= 'var hupso_url="' . $new_url . '";';
1770
- break;
1771
- case 'share_toolbar':
1772
- $code .= 'var hupso_url_t="' . $new_url . '";';
1773
- break;
1774
- case 'counters':
1775
- $code .= 'var hupso_url_c="' . $new_url . '";';
1776
- break;
1777
- }
1778
-
1779
  }
1780
 
 
1781
  if ( $hupso_title_text == 'post' ) {
1782
  $ptitle = strip_tags($post_title);
1783
  if ( $hupso_page_title != '' ) {
@@ -1858,7 +1882,8 @@ function hupso_the_content( $content ) {
1858
  $new_content = $content . '<div' . $hupso_css_out. '>' . $code . '</div>';
1859
  }
1860
  }
1861
-
 
1862
  return $new_content;
1863
 
1864
  }
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, 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: 3.9.25
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 = '3.9.25';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
70
  add_action('widgets_init', 'hupso_widget_init');
71
  add_shortcode( 'hupso', 'hupso_shortcodes' );
72
 
73
+
74
  /* Use shortcodes in text widgets */
75
  $hupso_widget_text = get_option( 'hupso_widget_text', '1');
76
  if ( $hupso_widget_text == '1' ) {
97
  }
98
 
99
  function hupso_shortcodes( $atts ) {
100
+ global $hupso_state, $hupso_shortcode_params;
101
+ $hupso_state = 'shortcodes';
102
+ if ($atts == '') {
103
+ return hupso_the_content_shortcodes('');
104
+ }
105
+ else {
106
+ $hupso_shortcode_params = $atts;
107
+ return hupso_the_content_shortcodes('');
108
+ }
109
  }
110
 
111
  if ( function_exists('register_activation_hook') )
309
  echo '<p><b>' . __('Shortcodes', 'hupso') . '</b></p>';
310
  echo '<p>Use <b>[hupso_hide]</b> anywhere in post\'s text to hide buttons for specific post.</p>';
311
  echo '<p>Use <b>[hupso]</b> anywhere in post\'s text to show buttons for specific post at custom position.</p>';
312
+ echo '<p>Use <b>[hupso url="URL"]</b> anywhere in post\'s text to show buttons for specific post at custom position and using custom URL.</p>';
313
  echo '<p>Use <b>Hupso Share Buttons Widget</b> to show share buttons in sidebar or footer.</p>';
314
  echo '<p>Use <b>echo do_shortcode( \'[hupso]\' ); </b> to show share buttons anywhere inside template files.</p>';
315
  echo '<p>Use <b>global $HUPSO_SHOW; $HUPSO_SHOW = false;</b> to hide share buttons inside template files. Make sure you do this before div id="content". This will hide the buttons in content. Share buttons will still show in widget (if used).</p>';
326
  echo '<p><b>Generic HTML code</b></p>';
327
  echo '<p>If you need generic HTML code for Hupso Share Buttons to use in HTML documents or inside other CMS, you can <a href="http://www.hupso.com/share/" target="_blank">generate the code here</a>.</p>';
328
  echo '</div>';
329
+
330
+ echo '<div id="translations" style="background: #99EEDD; padding: 10px 10px 10px 10px; margin-top:30px; ">';
331
+ echo '<p><b>Translations</b></p>';
332
+ echo '<p>If you would like to translate this plugin into your language, send message <a href="http://www.hupso.com/share/feedback/" target="_blank"> here</a>. Your translations will be included in the next version of the plugin.</p>';
333
+ echo '</div>';
334
 
335
  echo '</div>';
336
 
411
  <tr><td><input type="radio" name="size" value="button100x23" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button100_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_100_img ?></td></tr>
412
  <tr><td><input type="radio" name="size" value="button120x28" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button120_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_120_img ?></td></tr>
413
  <tr><td><input type="radio" name="size" value="button160x37" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button160_checked; ?>/></td><td style="padding-right:20px;"><?php echo $button_160_img ?></td></tr>
414
+ <tr><td><input type="radio" name="size" value="custom" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $share_button_custom_checked; ?> /></td><td style="padding-left:10px;"><?php _e('Custom image from URL', 'hupso'); ?>: <input type="text" name="hupso_button_image_custom_url" onchange="create_code()" style="width:300px;" value="<?php echo $hupso_button_image_custom_url; ?>"/><br/> See <a href="http://www.hupso.com/share/gallery.php" target="_blank">gallery of custom share buttons</a>.</td></tr>
415
  </table>
416
  <hr style="height:1px; width:500px;"/>
417
  </td>
1244
  /* save custom post types */
1245
  $args = array(
1246
  'public' => true,
 
1247
  '_builtin' => false
1248
  );
1249
  $output = 'names'; // names or objects, note names is the default
1280
  global $hupso_state, $post;
1281
  $hupso_state = 'normal';
1282
 
1283
+
1284
  $hupso_show_excerpts = get_option( 'hupso_show_excerpts' , '1' );
1285
  if ( ( $hupso_show_excerpts == 1 ) && ( $post->post_type != 'attachment' ) ) {
1286
  return hupso_the_content ( $content );
1292
 
1293
  function hupso_the_content_shortcodes( $content ) {
1294
  global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p, $post;
1295
+ global $post_url, $post_title, $hupso_shortcode_params;
1296
+
1297
  $value = '';
1298
  $hupso_meta_box = get_option( 'hupso_meta_box', '' );
1299
  if ($hupso_meta_box != "1") {
1320
  }
1321
 
1322
  $post_url = ( isset($GLOBALS['post']) ? get_permalink($GLOBALS['post']->ID) : get_permalink() );
1323
+ $post_title = ( isset( $GLOBALS['post'] ) ? $GLOBALS['post']->post_title : '' );
1324
+
1325
+ if ( isset($hupso_shortcode_params['title']) ) {
1326
+ $post_title = $hupso_shortcode_params['title'];
1327
+ }
1328
 
1329
+ if ( isset($hupso_shortcode_params['url']) ) {
1330
+ $post_url = $hupso_shortcode_params['url'];
1331
+ }
1332
+
1333
 
1334
  /* Check if we are inside category where buttons are hidden */
1335
  $cats = get_the_category();
1422
  }
1423
 
1424
 
1425
+ /* Shortcode param */
1426
+ if ( ($hupso_shortcode_params != '') && ($h_url != '') ) {
1427
+ $new_url = $h_url;
1428
+ }
1429
+ else {
1430
  $new_url = $post_url;
1431
+ }
1432
 
1433
+ switch ( $button_type ) {
1434
+ case 'share_button':
1435
+ $code .= 'var hupso_url="' . $new_url . '";';
1436
+ break;
1437
+ case 'share_toolbar':
1438
+ $code .= 'var hupso_url_t="' . $new_url . '";';
1439
+ break;
1440
+ case 'counters':
1441
+ $code .= 'var hupso_url_c="' . $new_url . '";';
1442
+ break;
1443
+ }
1444
 
1445
 
1446
 
1527
  }
1528
  }
1529
 
1530
+ $hupso_shortcode_params = '';
1531
  return $new_content;
1532
  }
1533
 
1534
  function hupso_the_content( $content ) {
1535
 
1536
  global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p, $post;
1537
+
1538
+ if (strpos($content, '[hupso ') !== false) {
1539
+ return $content;
1540
+ }
1541
+
1542
  $value = '';
1543
  $hupso_meta_box = get_option( 'hupso_meta_box', '' );
1544
  if ($hupso_meta_box != "1") {
1685
  $hupso_twitter_via = get_option( 'hupso_twitter_via', '' );
1686
  $hupso_counters_lang = get_option( 'hupso_counters_lang', 'en_US' );
1687
 
1688
+ $post_url = ( isset($GLOBALS['post']) ? get_permalink($GLOBALS['post']->ID) : get_permalink() );
1689
  $post_title = ( isset( $GLOBALS['post'] ) ? $GLOBALS['post']->post_title : '' );
1690
 
1691
  if ( ( $hupso_state == 'widget' ) || ( $hupso_state == 'shortcodes' ) ) {
1772
  }
1773
  }
1774
 
1775
+ $new_url = '';
1776
+
1777
  if ( ( is_home() && $hupso_show_frontpage == 1 ) || ( is_archive() && $hupso_show_category == 1 ) || ( $hupso_shortcode_params != '' ) ) {
1778
  if ( $hupso_page_url != '' ) {
1779
  $new_url = $hupso_page_url;
1786
  if ( ($hupso_shortcode_params != '') && ($h_url != '') ) {
1787
  $new_url = $h_url;
1788
  }
1789
+
1790
+ }
1791
+
1792
+ switch ( $button_type ) {
1793
+ case 'share_button':
1794
+ $code .= 'var hupso_url="' . $new_url . '";';
1795
+ break;
1796
+ case 'share_toolbar':
1797
+ $code .= 'var hupso_url_t="' . $new_url . '";';
1798
+ break;
1799
+ case 'counters':
1800
+ $code .= 'var hupso_url_c="' . $new_url . '";';
1801
+ break;
1802
  }
1803
 
1804
+
1805
  if ( $hupso_title_text == 'post' ) {
1806
  $ptitle = strip_tags($post_title);
1807
  if ( $hupso_page_title != '' ) {
1882
  $new_content = $content . '<div' . $hupso_css_out. '>' . $code . '</div>';
1883
  }
1884
  }
1885
+
1886
+ $hupso_shortcode_params = '';
1887
  return $new_content;
1888
 
1889
  }