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

Version Description

  • Plugin name changed to "Hupso Social Media Share Buttons"
Download this release

Release Info

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

Code changes from version 4.5.0 to 4.6.0

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, 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, amp
5
  Requires at least: 2.9
6
- Tested up to: 5.1.1
7
- Stable tag: 4.5.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -76,7 +76,7 @@ If you would like to translate into your language, send message [here](http://ww
76
 
77
  1. Download plugin file (.zip)
78
  2. Extract zip file and upload folder /hupso-share-buttons-for-twitter-facebook-google/ to /wp-content/plugins/
79
- 3. Go to "Plugins" and activate the plugin "Hupso Share Buttons for Twitter, Facebook & Google+"
80
 
81
 
82
  == Frequently Asked Questions ==
@@ -307,6 +307,9 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
307
 
308
  == Changelog ==
309
 
 
 
 
310
  = 4.5.0 =
311
  * Fixed a bug where plugin generated PHP Warning: Illegal string offset ‘filter’
312
 
1
+ === Hupso Social Media Share Buttons ===
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, 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, amp
5
  Requires at least: 2.9
6
+ Tested up to: 5.4
7
+ Stable tag: 4.6.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
76
 
77
  1. Download plugin file (.zip)
78
  2. Extract zip file and upload folder /hupso-share-buttons-for-twitter-facebook-google/ to /wp-content/plugins/
79
+ 3. Go to "Plugins" and activate the plugin "Hupso Social Media Share Buttons"
80
 
81
 
82
  == Frequently Asked Questions ==
307
 
308
  == Changelog ==
309
 
310
+ = 4.6.0 =
311
+ * Plugin name changed to "Hupso Social Media Share Buttons"
312
+
313
  = 4.5.0 =
314
  * Fixed a bug where plugin generated PHP Warning: Illegal string offset ‘filter’
315
 
share-buttons-hupso-meta.php CHANGED
@@ -11,7 +11,6 @@ else {
11
  add_action( 'add_meta_boxes', 'hupso_add_custom_box' );
12
  }
13
 
14
-
15
  // Add Hupso for 'posts' and 'pages'
16
  add_filter('manage_posts_columns', 'hupso_manage_posts_columns', 10, 2);
17
  add_filter('manage_pages_columns', 'hupso_manage_posts_columns', 10, 2);
@@ -21,7 +20,6 @@ function hupso_manage_posts_columns($posts_columns)
21
  return $posts_columns;
22
  }
23
 
24
-
25
  add_action( 'manage_posts_custom_column' , 'hupso_manage_posts_custom_column', 10, 2 );
26
  add_action( 'manage_pages_custom_column' , 'hupso_manage_posts_custom_column', 10, 2 );
27
 
@@ -48,7 +46,6 @@ function hupso_manage_posts_custom_column( $column, $post_id ) {
48
  }
49
  }
50
 
51
-
52
  /* Do something with the data entered */
53
  add_action( 'save_post', 'hupso_save_post' );
54
 
11
  add_action( 'add_meta_boxes', 'hupso_add_custom_box' );
12
  }
13
 
 
14
  // Add Hupso for 'posts' and 'pages'
15
  add_filter('manage_posts_columns', 'hupso_manage_posts_columns', 10, 2);
16
  add_filter('manage_pages_columns', 'hupso_manage_posts_columns', 10, 2);
20
  return $posts_columns;
21
  }
22
 
 
23
  add_action( 'manage_posts_custom_column' , 'hupso_manage_posts_custom_column', 10, 2 );
24
  add_action( 'manage_pages_custom_column' , 'hupso_manage_posts_custom_column', 10, 2 );
25
 
46
  }
47
  }
48
 
 
49
  /* Do something with the data entered */
50
  add_action( 'save_post', 'hupso_save_post' );
51
 
share-buttons-hupso.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
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.5.0
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.5.0';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
@@ -215,7 +215,7 @@ function hupso_plugin_activation() {
215
  }
216
 
217
  function hupso_admin_menu() {
218
- add_options_page('Hupso Share Buttons Settings', 'Hupso Share Buttons', 'manage_options', __FILE__, 'hupso_admin_settings_show', '', 6);
219
  }
220
 
221
  function hupso_prefetch() {
@@ -287,12 +287,10 @@ function hupso_set_facebook_thumbnail() {
287
  break;
288
  }
289
 
290
-
291
  if ( $thumb_image != '' ) {
292
  echo '<meta property="og:image" content="' . esc_url($thumb_image) . '"/>';
293
  }
294
 
295
-
296
  $keep_likes = get_option( 'hupso_keep_likes' , '0' );
297
  if ( $keep_likes == '1' ) {
298
  $url = 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
@@ -300,14 +298,12 @@ function hupso_set_facebook_thumbnail() {
300
  }
301
  }
302
 
303
-
304
  function hupso_get_the_excerpt($content) {
305
  $content = str_ireplace('[hupso_hide]', '', $content);
306
  $content = str_ireplace('[hupso]', '', $content);
307
  return $content;
308
  }
309
 
310
-
311
  function hupso_admin_settings_show() {
312
  if ( !current_user_can( 'manage_options' ) ) {
313
  wp_die( __( 'You do not have sufficient permissions to access this page.' , 'hupso') );
@@ -324,8 +320,6 @@ function hupso_admin_settings_show() {
324
  'hupso_create_button',
325
  plugins_url('/js/create_button.js', __FILE__ )
326
  );
327
-
328
-
329
 
330
  $hupso_lang_code = __('en_US', 'hupso');
331
  $hupso_language = __('English', 'hupso');
@@ -344,7 +338,7 @@ function hupso_admin_settings_show() {
344
 
345
  echo '<div id="save_warning"></div>';
346
  echo '<div class="wrap" style="padding-bottom:100px;"><div class="icon32" id="icon-users"></div>';
347
- echo '<h2>'. __('Hupso Share Buttons for Twitter, Facebook & Google+ (Settings)', 'hupso').'</h2>';
348
  echo '<form name="hupso_settings_form" method="post" action="">';
349
 
350
  echo '<div id="right" style="float:right; width:200px; margin-right:10px; margin-left:20px; margin-top:20px;">';
@@ -358,7 +352,7 @@ function hupso_admin_settings_show() {
358
  echo '<p><b>' . __('Shortcodes', 'hupso') . '</b></p>';
359
  echo '<p>Use <b>[hupso_hide]</b> anywhere in post\'s text to hide buttons for specific post.</p>';
360
  echo '<p>Use <b>[hupso]</b> anywhere in post\'s text to show buttons for specific post at custom position.</p>';
361
- 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>';
362
  echo '<p>Use <b>Hupso Share Buttons Widget</b> to show share buttons in sidebar or footer.</p>';
363
  echo '<p>Use <b>echo do_shortcode( \'[hupso]\' ); </b> to show share buttons anywhere inside template files.</p>';
364
  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>';
@@ -376,14 +370,12 @@ function hupso_admin_settings_show() {
376
  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>';
377
  echo '</div>';
378
 
379
- echo '<div id="translations" style="background: #99EEDD; padding: 10px 10px 10px 10px; margin-top:30px; ">';
380
- echo '<p><b>Translations</b></p>';
381
- 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>';
382
- echo '</div>';
383
-
384
  echo '</div>';
385
 
386
-
387
  $start = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ -->';
388
  $end = '<!-- Hupso Share Buttons -->';
389
  $class_name = 'hupso_pop';
@@ -397,7 +389,6 @@ function hupso_admin_settings_show() {
397
  $button_120_img = '<img style="'.$style.' width: 120px; height:28px;" src="'.$hupso_plugin_url.'/buttons/button120x28.png" alt="'.$alt.'"/>';
398
  $button_160_img = '<img style="'.$style.' width: 160px; height:37px;" src="'.$hupso_plugin_url.'/buttons/button160x37.png" alt="'.$alt.'"/>';
399
 
400
-
401
  $checked = 'checked="checked"';
402
  $current_button_size = sanitize_text_field(get_option( 'hupso_button_size' , 'button100x23' ));
403
  $button60_checked = '';
@@ -416,7 +407,6 @@ function hupso_admin_settings_show() {
416
  default:
417
  $button100_checked = $checked; break;
418
  }
419
-
420
  ?>
421
 
422
  <input type="hidden" name="code" value="" />
@@ -495,7 +485,6 @@ function hupso_admin_settings_show() {
495
  </table>
496
  </div>
497
 
498
-
499
  <div id="share_image" style="padding-top:10px;">
500
  <table style="border: 0px;">
501
  <tr>
@@ -575,8 +564,6 @@ function hupso_admin_settings_show() {
575
  <tr><td style="width:100px;"><?php _e('Border color');?></td><td><input class="color" type="text" id="border_color" name="border_color" value="#<?php echo esc_attr($hupso_border_color); ?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" style="width: 100px;" /><input style="margin-left:30px;" type="button" value="Restore default" onclick="hupso_restore_border_color()" /> <hr style="height:1px; width:500px;"/></td></tr>
576
  </table>
577
  </div>
578
-
579
-
580
 
581
  <div id="services">
582
  <table style="border: 0px;">
@@ -1359,10 +1346,8 @@ function hupso_admin_settings_save() {
1359
  update_option( 'hupso_keep_likes', '0' );
1360
  }
1361
  }
1362
-
1363
  }
1364
 
1365
-
1366
  function hupso_the_widget( $content ) {
1367
  global $hupso_state;
1368
  $hupso_state = 'widget';
@@ -1379,7 +1364,6 @@ function hupso_the_excerpt( $content ) {
1379
  global $hupso_state, $post;
1380
  $hupso_state = 'normal';
1381
 
1382
-
1383
  $hupso_show_excerpts = sanitize_text_field(get_option( 'hupso_show_excerpts' , '1' ));
1384
  if ( ( $hupso_show_excerpts == 1 ) && ( $post->post_type != 'attachment' ) ) {
1385
  return hupso_the_content ( $content );
@@ -1426,14 +1410,13 @@ function hupso_the_content_shortcodes( $content ) {
1426
  $post_url = ( isset($GLOBALS['post']) ? get_permalink($GLOBALS['post']->ID) : get_permalink() );
1427
  $post_title = ( isset( $GLOBALS['post'] ) ? $GLOBALS['post']->post_title : '' );
1428
 
1429
- if ( isset($hupso_shortcode_params['title']) ) {
1430
- $post_title = $hupso_shortcode_params['title'];
1431
- }
1432
-
1433
- if ( isset($hupso_shortcode_params['url']) ) {
1434
- $post_url = $hupso_shortcode_params['url'];
1435
- }
1436
 
 
 
 
1437
 
1438
  /* Check if we are inside category where buttons are hidden */
1439
  $cats = get_the_category();
@@ -1526,7 +1509,6 @@ function hupso_the_content_shortcodes( $content ) {
1526
  }
1527
  }
1528
 
1529
-
1530
  /* Shortcode param */
1531
  if ( ($hupso_shortcode_params != '') && ($h_url != '') ) {
1532
  $new_url = $h_url;
@@ -1546,8 +1528,6 @@ function hupso_the_content_shortcodes( $content ) {
1546
  $code .= 'var hupso_url_c="' . esc_url($new_url) . '";';
1547
  break;
1548
  }
1549
-
1550
-
1551
 
1552
  if ( $hupso_title_text == 'post' ) {
1553
  $ptitle = strip_tags($post_title);
@@ -1577,7 +1557,6 @@ function hupso_the_content_shortcodes( $content ) {
1577
  break;
1578
  }
1579
  }
1580
-
1581
  $code .= '</script>';
1582
 
1583
  switch ( $button_type ) {
@@ -1640,9 +1619,9 @@ function hupso_the_content( $content ) {
1640
 
1641
  global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p, $post;
1642
 
1643
- if (strpos($content, '[hupso ') !== false) {
1644
- return $content;
1645
- }
1646
 
1647
  $value = '';
1648
  $hupso_meta_box = sanitize_text_field(get_option( 'hupso_meta_box', '' ));
@@ -1671,12 +1650,10 @@ function hupso_the_content( $content ) {
1671
  return $content;
1672
  }
1673
 
1674
-
1675
  if ( function_exists('is_amp_endpoint') ) {
1676
  if ( is_amp_endpoint() )
1677
  return $content;
1678
  }
1679
-
1680
 
1681
  /* Check custom post types */
1682
  if (isset($post)) {
@@ -1816,7 +1793,6 @@ function hupso_the_content( $content ) {
1816
  $hupso_page_url = esc_url(get_option( 'hupso_page_url', '' ));
1817
  $hupso_page_title = stripslashes(sanitize_text_field(get_option( 'hupso_page_title', '' )));
1818
 
1819
-
1820
  /* default code */
1821
  $share_code = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ --><a class="hupso_toolbar" href="http://www.hupso.com/share/"><img src="' . $hupso_p . '//static.hupso.com/share' . $hupso_dev . '/buttons/share-medium.png" style="border:0px; padding-top:5px; float:left;" alt="Share"/></a><script type="text/javascript">var hupso_services_t=new Array("Twitter","Facebook","Linkedin","StumbleUpon","Digg","Reddit","Bebo","Delicious"); var hupso_toolbar_size_t="medium";';
1822
 
@@ -1915,7 +1891,6 @@ function hupso_the_content( $content ) {
1915
  break;
1916
  }
1917
 
1918
-
1919
  if ( $hupso_title_text == 'post' ) {
1920
  $ptitle = strip_tags($post_title);
1921
  if ( $hupso_page_title != '' ) {
@@ -1942,7 +1917,6 @@ function hupso_the_content( $content ) {
1942
  break;
1943
  }
1944
  }
1945
-
1946
  $code .= '</script>';
1947
 
1948
  switch ( $button_type ) {
@@ -2037,7 +2011,6 @@ function hupso_plugin_action_links( $links, $file ) {
2037
  return $links;
2038
  }
2039
 
2040
-
2041
  function hupso_counters_lang_list() {
2042
  $languages = array (
2043
  'af_ZA' => 'Afrikaans',
@@ -2129,10 +2102,6 @@ function hupso_counters_lang_list() {
2129
  $sel_lang = '';
2130
  echo '<option value="' . esc_attr($lang_code) . '"'. $sel_lang .'>' . esc_attr($lang_name) . '</option>';
2131
  }
2132
-
2133
  }
2134
 
2135
-
2136
-
2137
-
2138
  ?>
1
  <?php
2
  /*
3
+ Plugin Name: Hupso Social Media Share Buttons
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.6.0
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.6.0';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
215
  }
216
 
217
  function hupso_admin_menu() {
218
+ add_options_page('Hupso Share Buttons Settings', 'Hupso Share Buttons', 'manage_options', __FILE__, 'hupso_admin_settings_show', 6);
219
  }
220
 
221
  function hupso_prefetch() {
287
  break;
288
  }
289
 
 
290
  if ( $thumb_image != '' ) {
291
  echo '<meta property="og:image" content="' . esc_url($thumb_image) . '"/>';
292
  }
293
 
 
294
  $keep_likes = get_option( 'hupso_keep_likes' , '0' );
295
  if ( $keep_likes == '1' ) {
296
  $url = 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
298
  }
299
  }
300
 
 
301
  function hupso_get_the_excerpt($content) {
302
  $content = str_ireplace('[hupso_hide]', '', $content);
303
  $content = str_ireplace('[hupso]', '', $content);
304
  return $content;
305
  }
306
 
 
307
  function hupso_admin_settings_show() {
308
  if ( !current_user_can( 'manage_options' ) ) {
309
  wp_die( __( 'You do not have sufficient permissions to access this page.' , 'hupso') );
320
  'hupso_create_button',
321
  plugins_url('/js/create_button.js', __FILE__ )
322
  );
 
 
323
 
324
  $hupso_lang_code = __('en_US', 'hupso');
325
  $hupso_language = __('English', 'hupso');
338
 
339
  echo '<div id="save_warning"></div>';
340
  echo '<div class="wrap" style="padding-bottom:100px;"><div class="icon32" id="icon-users"></div>';
341
+ echo '<h2>'. __('Hupso Social Media Share Buttons', 'hupso').'</h2>';
342
  echo '<form name="hupso_settings_form" method="post" action="">';
343
 
344
  echo '<div id="right" style="float:right; width:200px; margin-right:10px; margin-left:20px; margin-top:20px;">';
352
  echo '<p><b>' . __('Shortcodes', 'hupso') . '</b></p>';
353
  echo '<p>Use <b>[hupso_hide]</b> anywhere in post\'s text to hide buttons for specific post.</p>';
354
  echo '<p>Use <b>[hupso]</b> anywhere in post\'s text to show buttons for specific post at custom position.</p>';
355
+ 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>';
356
  echo '<p>Use <b>Hupso Share Buttons Widget</b> to show share buttons in sidebar or footer.</p>';
357
  echo '<p>Use <b>echo do_shortcode( \'[hupso]\' ); </b> to show share buttons anywhere inside template files.</p>';
358
  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>';
370
  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>';
371
  echo '</div>';
372
 
373
+ echo '<div id="translations" style="background: #99EEDD; padding: 10px 10px 10px 10px; margin-top:30px; ">';
374
+ echo '<p><b>Translations</b></p>';
375
+ 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>';
376
+ echo '</div>';
 
377
  echo '</div>';
378
 
 
379
  $start = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ -->';
380
  $end = '<!-- Hupso Share Buttons -->';
381
  $class_name = 'hupso_pop';
389
  $button_120_img = '<img style="'.$style.' width: 120px; height:28px;" src="'.$hupso_plugin_url.'/buttons/button120x28.png" alt="'.$alt.'"/>';
390
  $button_160_img = '<img style="'.$style.' width: 160px; height:37px;" src="'.$hupso_plugin_url.'/buttons/button160x37.png" alt="'.$alt.'"/>';
391
 
 
392
  $checked = 'checked="checked"';
393
  $current_button_size = sanitize_text_field(get_option( 'hupso_button_size' , 'button100x23' ));
394
  $button60_checked = '';
407
  default:
408
  $button100_checked = $checked; break;
409
  }
 
410
  ?>
411
 
412
  <input type="hidden" name="code" value="" />
485
  </table>
486
  </div>
487
 
 
488
  <div id="share_image" style="padding-top:10px;">
489
  <table style="border: 0px;">
490
  <tr>
564
  <tr><td style="width:100px;"><?php _e('Border color');?></td><td><input class="color" type="text" id="border_color" name="border_color" value="#<?php echo esc_attr($hupso_border_color); ?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" style="width: 100px;" /><input style="margin-left:30px;" type="button" value="Restore default" onclick="hupso_restore_border_color()" /> <hr style="height:1px; width:500px;"/></td></tr>
565
  </table>
566
  </div>
 
 
567
 
568
  <div id="services">
569
  <table style="border: 0px;">
1346
  update_option( 'hupso_keep_likes', '0' );
1347
  }
1348
  }
 
1349
  }
1350
 
 
1351
  function hupso_the_widget( $content ) {
1352
  global $hupso_state;
1353
  $hupso_state = 'widget';
1364
  global $hupso_state, $post;
1365
  $hupso_state = 'normal';
1366
 
 
1367
  $hupso_show_excerpts = sanitize_text_field(get_option( 'hupso_show_excerpts' , '1' ));
1368
  if ( ( $hupso_show_excerpts == 1 ) && ( $post->post_type != 'attachment' ) ) {
1369
  return hupso_the_content ( $content );
1410
  $post_url = ( isset($GLOBALS['post']) ? get_permalink($GLOBALS['post']->ID) : get_permalink() );
1411
  $post_title = ( isset( $GLOBALS['post'] ) ? $GLOBALS['post']->post_title : '' );
1412
 
1413
+ if ( isset($hupso_shortcode_params['title']) ) {
1414
+ $post_title = $hupso_shortcode_params['title'];
1415
+ }
 
 
 
 
1416
 
1417
+ if ( isset($hupso_shortcode_params['url']) ) {
1418
+ $post_url = $hupso_shortcode_params['url'];
1419
+ }
1420
 
1421
  /* Check if we are inside category where buttons are hidden */
1422
  $cats = get_the_category();
1509
  }
1510
  }
1511
 
 
1512
  /* Shortcode param */
1513
  if ( ($hupso_shortcode_params != '') && ($h_url != '') ) {
1514
  $new_url = $h_url;
1528
  $code .= 'var hupso_url_c="' . esc_url($new_url) . '";';
1529
  break;
1530
  }
 
 
1531
 
1532
  if ( $hupso_title_text == 'post' ) {
1533
  $ptitle = strip_tags($post_title);
1557
  break;
1558
  }
1559
  }
 
1560
  $code .= '</script>';
1561
 
1562
  switch ( $button_type ) {
1619
 
1620
  global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p, $post;
1621
 
1622
+ if (strpos($content, '[hupso ') !== false) {
1623
+ return $content;
1624
+ }
1625
 
1626
  $value = '';
1627
  $hupso_meta_box = sanitize_text_field(get_option( 'hupso_meta_box', '' ));
1650
  return $content;
1651
  }
1652
 
 
1653
  if ( function_exists('is_amp_endpoint') ) {
1654
  if ( is_amp_endpoint() )
1655
  return $content;
1656
  }
 
1657
 
1658
  /* Check custom post types */
1659
  if (isset($post)) {
1793
  $hupso_page_url = esc_url(get_option( 'hupso_page_url', '' ));
1794
  $hupso_page_title = stripslashes(sanitize_text_field(get_option( 'hupso_page_title', '' )));
1795
 
 
1796
  /* default code */
1797
  $share_code = '<!-- Hupso Share Buttons - http://www.hupso.com/share/ --><a class="hupso_toolbar" href="http://www.hupso.com/share/"><img src="' . $hupso_p . '//static.hupso.com/share' . $hupso_dev . '/buttons/share-medium.png" style="border:0px; padding-top:5px; float:left;" alt="Share"/></a><script type="text/javascript">var hupso_services_t=new Array("Twitter","Facebook","Linkedin","StumbleUpon","Digg","Reddit","Bebo","Delicious"); var hupso_toolbar_size_t="medium";';
1798
 
1891
  break;
1892
  }
1893
 
 
1894
  if ( $hupso_title_text == 'post' ) {
1895
  $ptitle = strip_tags($post_title);
1896
  if ( $hupso_page_title != '' ) {
1917
  break;
1918
  }
1919
  }
 
1920
  $code .= '</script>';
1921
 
1922
  switch ( $button_type ) {
2011
  return $links;
2012
  }
2013
 
 
2014
  function hupso_counters_lang_list() {
2015
  $languages = array (
2016
  'af_ZA' => 'Afrikaans',
2102
  $sel_lang = '';
2103
  echo '<option value="' . esc_attr($lang_code) . '"'. $sel_lang .'>' . esc_attr($lang_name) . '</option>';
2104
  }
 
2105
  }
2106
 
 
 
 
2107
  ?>