Social Media Share Buttons - Version 4.1.1

Version Description

Download this release

Release Info

Developer joaoromao
Plugin Icon 128x128 Social Media Share Buttons
Version 4.1.1
Comparing to
See all releases

Code changes from version 4.1 to 4.1.1

Files changed (51) hide show
  1. img/apps/address-tracker.png +0 -0
  2. img/apps/bitly.png +0 -0
  3. img/apps/custom-actions.png +0 -0
  4. img/apps/custom-bar.png +0 -0
  5. img/apps/floating-bar-big-counter.png +0 -0
  6. img/apps/floating-bar.png +0 -0
  7. img/apps/floating-follow-bar.png +0 -0
  8. img/apps/follow-bar.png +0 -0
  9. img/apps/follow-floating-bar.png +0 -0
  10. img/apps/follow-mobile-bar.png +0 -0
  11. img/apps/ga_integration.png +0 -0
  12. img/apps/image-sharing.png +0 -0
  13. img/apps/infusionsoft.png +0 -0
  14. img/apps/mailchimp.png +0 -0
  15. img/apps/mobile-bar.png +0 -0
  16. img/apps/mobile-follow-bar.png +0 -0
  17. img/apps/native-bar.png +0 -0
  18. img/apps/price-alert.png +0 -0
  19. img/apps/reaction_buttons.png +0 -0
  20. img/apps/sharing-bar.png +0 -0
  21. img/apps/social-bar-big-counter.png +0 -0
  22. img/apps/social-bar.png +0 -0
  23. img/apps/subscribe-bar.png +0 -0
  24. img/apps/subscriber-bar.png +0 -0
  25. img/apps/welcome-bar.png +0 -0
  26. img/getsocial-app-logo.png +0 -0
  27. img/modals/bitly_via_after.png +0 -0
  28. img/modals/bitly_via_before.png +0 -0
  29. img/modals/copy_paste.png +0 -0
  30. img/modals/ga_integration.png +0 -0
  31. img/modals/hello_buddy_analytics.png +0 -0
  32. img/modals/infusionsoft.png +0 -0
  33. img/modals/mailchimp.png +0 -0
  34. img/woocommerce.png +0 -0
  35. js/plugin.js +15 -15
  36. lib/gs.php +5 -9
  37. lib/onboarding_popup.php +0 -1
  38. readme.txt +7 -4
  39. screenshot-1.png +0 -0
  40. screenshot-2.png +0 -0
  41. screenshot-3.png +0 -0
  42. screenshot-4.png +0 -0
  43. screenshot-5.png +0 -0
  44. screenshot-6.png +0 -0
  45. screenshot-7.png +0 -0
  46. screenshot-8.png +0 -0
  47. screenshot-9.png +0 -0
  48. tmpl/apps.php +3 -12
  49. tmpl/apps_config.php +1 -1
  50. uninstall.php +7 -7
  51. wp-share-buttons-analytics-getsocial.php +12 -51
img/apps/address-tracker.png CHANGED
Binary file
img/apps/bitly.png CHANGED
Binary file
img/apps/custom-actions.png CHANGED
Binary file
img/apps/custom-bar.png CHANGED
Binary file
img/apps/floating-bar-big-counter.png CHANGED
Binary file
img/apps/floating-bar.png CHANGED
Binary file
img/apps/floating-follow-bar.png CHANGED
Binary file
img/apps/follow-bar.png CHANGED
Binary file
img/apps/follow-floating-bar.png CHANGED
Binary file
img/apps/follow-mobile-bar.png CHANGED
Binary file
img/apps/ga_integration.png CHANGED
Binary file
img/apps/image-sharing.png CHANGED
Binary file
img/apps/infusionsoft.png CHANGED
Binary file
img/apps/mailchimp.png CHANGED
Binary file
img/apps/mobile-bar.png CHANGED
Binary file
img/apps/mobile-follow-bar.png CHANGED
Binary file
img/apps/native-bar.png CHANGED
Binary file
img/apps/price-alert.png CHANGED
Binary file
img/apps/reaction_buttons.png CHANGED
Binary file
img/apps/sharing-bar.png CHANGED
Binary file
img/apps/social-bar-big-counter.png CHANGED
Binary file
img/apps/social-bar.png CHANGED
Binary file
img/apps/subscribe-bar.png CHANGED
Binary file
img/apps/subscriber-bar.png CHANGED
Binary file
img/apps/welcome-bar.png CHANGED
Binary file
img/getsocial-app-logo.png CHANGED
Binary file
img/modals/bitly_via_after.png CHANGED
Binary file
img/modals/bitly_via_before.png CHANGED
Binary file
img/modals/copy_paste.png CHANGED
Binary file
img/modals/ga_integration.png CHANGED
Binary file
img/modals/hello_buddy_analytics.png CHANGED
Binary file
img/modals/infusionsoft.png CHANGED
Binary file
img/modals/mailchimp.png CHANGED
Binary file
img/woocommerce.png CHANGED
Binary file
js/plugin.js CHANGED
@@ -38,9 +38,9 @@ jQuery('.getsocial-tab').on('click', function(e){
38
 
39
  jQuery('#request_api_key').on('click', function(e){
40
  e.preventDefault();
41
-
42
  user_data = jQuery(".account-info .field-input");
43
-
44
  url = jQuery(user_data[0]).text().trim();
45
  email = jQuery(user_data[1]).val();
46
 
@@ -58,11 +58,11 @@ jQuery('#request_api_key').on('click', function(e){
58
 
59
  modal_id.removeClass('hide').addClass('active');
60
  var detectIE = document.addEventListener && !window.requestAnimationFrame;
61
-
62
  if(detectIE){
63
  modal_id.find('.gs-modal').css({ 'opacity' : 1 });
64
  }
65
-
66
  jQuery('body').addClass('no-scroll');
67
  }
68
  }
@@ -145,10 +145,10 @@ jQuery(function($){
145
 
146
  jQuery.post(
147
  jQuery(this).attr('href'),
148
- {
149
- email: jQuery("#gs-user-email").val(),
150
  url: jQuery(".account-info .field-input").text().trim(),
151
- source: 'wordpress'
152
  },
153
  function(data) {
154
  if(data.errors != undefined){
@@ -157,7 +157,7 @@ jQuery(function($){
157
  jQuery('.notification-bar.gs-error').show().find('p').html(data.errors[0]);
158
  jQuery('#error-type-' + data.error_type).show();
159
  jQuery('.api-key').show();
160
-
161
  if (data.error_type == 1) {
162
  $("input[name='save-changes']").hide();
163
  }
@@ -202,7 +202,7 @@ jQuery(function($){
202
  if ($(this)[0].pathname == "/auth/mailchimp") {
203
 
204
  if ($(this).attr('prevent')) {
205
- alert("You need to install Hello Buddy, Subscriber Bar or Price Alert to work with this app");
206
  } else {
207
  window.open($(this).attr('href'), '_blank')
208
  }
@@ -318,7 +318,7 @@ jQuery(function($){
318
  filters.push('filter-' + filter);
319
 
320
  if(title.length > 0) title += '<i class="fa fa-plus"></i>';
321
-
322
  if(isCategoryFilter) {
323
  categoryFilter = filter;
324
 
@@ -348,9 +348,9 @@ jQuery(function($){
348
 
349
  $.each($('.app-group'), function(i, group){
350
  var selectedApps = $(group).find('.app-link-wrapper').filter(function () {
351
- return this.style.display == 'block';
352
  });
353
-
354
  if (selectedApps.length == 0) {
355
  $(group).hide();
356
  } else {
@@ -438,12 +438,12 @@ jQuery(function($){
438
  if(detectIE){
439
  modal_id.find('.gs-modal').css({ 'opacity' : 1 });
440
  }
441
-
442
  jQuery('body').addClass('no-scroll');
443
  }
444
  });
445
  }
446
-
447
  modal('#settings');
448
 
449
  modal('#install-ga_integration');
@@ -477,7 +477,7 @@ jQuery(function($){
477
  var domain = email.replace(/.*@/, "");
478
  var sub_level = domain.split(".")[0];
479
  var top_level = domain.split(".")[1];
480
-
481
  if (sub_level == "localhost" || sub_level == "local" || sub_level == "localdomain"
482
  || top_level == "localhost" || top_level == "local" || top_level == "localdomain") {
483
  return false;
38
 
39
  jQuery('#request_api_key').on('click', function(e){
40
  e.preventDefault();
41
+
42
  user_data = jQuery(".account-info .field-input");
43
+
44
  url = jQuery(user_data[0]).text().trim();
45
  email = jQuery(user_data[1]).val();
46
 
58
 
59
  modal_id.removeClass('hide').addClass('active');
60
  var detectIE = document.addEventListener && !window.requestAnimationFrame;
61
+
62
  if(detectIE){
63
  modal_id.find('.gs-modal').css({ 'opacity' : 1 });
64
  }
65
+
66
  jQuery('body').addClass('no-scroll');
67
  }
68
  }
145
 
146
  jQuery.post(
147
  jQuery(this).attr('href'),
148
+ {
149
+ email: jQuery("#gs-user-email").val(),
150
  url: jQuery(".account-info .field-input").text().trim(),
151
+ source: 'wordpress'
152
  },
153
  function(data) {
154
  if(data.errors != undefined){
157
  jQuery('.notification-bar.gs-error').show().find('p').html(data.errors[0]);
158
  jQuery('#error-type-' + data.error_type).show();
159
  jQuery('.api-key').show();
160
+
161
  if (data.error_type == 1) {
162
  $("input[name='save-changes']").hide();
163
  }
202
  if ($(this)[0].pathname == "/auth/mailchimp") {
203
 
204
  if ($(this).attr('prevent')) {
205
+ alert("You need to install Hello Buddy or Subscriber Bar to work with this app");
206
  } else {
207
  window.open($(this).attr('href'), '_blank')
208
  }
318
  filters.push('filter-' + filter);
319
 
320
  if(title.length > 0) title += '<i class="fa fa-plus"></i>';
321
+
322
  if(isCategoryFilter) {
323
  categoryFilter = filter;
324
 
348
 
349
  $.each($('.app-group'), function(i, group){
350
  var selectedApps = $(group).find('.app-link-wrapper').filter(function () {
351
+ return this.style.display == 'block';
352
  });
353
+
354
  if (selectedApps.length == 0) {
355
  $(group).hide();
356
  } else {
438
  if(detectIE){
439
  modal_id.find('.gs-modal').css({ 'opacity' : 1 });
440
  }
441
+
442
  jQuery('body').addClass('no-scroll');
443
  }
444
  });
445
  }
446
+
447
  modal('#settings');
448
 
449
  modal('#install-ga_integration');
477
  var domain = email.replace(/.*@/, "");
478
  var sub_level = domain.split(".")[0];
479
  var top_level = domain.split(".")[1];
480
+
481
  if (sub_level == "localhost" || sub_level == "local" || sub_level == "localdomain"
482
  || top_level == "localhost" || top_level == "local" || top_level == "localdomain") {
483
  return false;
lib/gs.php CHANGED
@@ -2,11 +2,11 @@
2
 
3
  class GS {
4
 
5
- public $plugin_version = "4.1";
6
- private $gs_url = "https://api.at.getsocial.io";
7
- private $gs_account = "https://getsocial.io";
8
- private $gs_url_api = "//api.at.getsocial.io";
9
- public $api_url = "https://getsocial.io/api/v1/";
10
 
11
  function __construct($api_key, $identifier, $lang) {
12
  $this->api_key = $api_key;
@@ -131,14 +131,10 @@ EOF;
131
  return '<div class="getsocial gs-inline-group" ' . $gs_custom_tags . '></div>';
132
  case 'native_bar':
133
  return '<div class="getsocial gs-native-bar" ' . $gs_custom_tags . '></div>';
134
- case 'custom_actions':
135
- return '<div class="getsocial gs-custom-actions" ' . $gs_custom_tags . '></div>';
136
  case 'social_bar_big_counter':
137
  return '<div class="getsocial gs-inline-group gs-big-counter" ' . $gs_custom_tags . '></div>';
138
  case 'follow_bar':
139
  return '<div class="getsocial gs-inline-group gs-follow" ' . $gs_custom_tags . '></div>';
140
- case 'price_alert':
141
- return '<div class="getsocial gs-price-alert" ' . $gs_custom_tags . ' data-price="' . $price . '" data-currency="' . $currency . '"></div>';
142
  case 'reaction_buttons':
143
  return '<div class="getsocial gs-reaction-button"' . $gs_custom_tags . '></div>';
144
  default:
2
 
3
  class GS {
4
 
5
+ public $plugin_version = "4.1.1";
6
+ private $gs_url = "https://api.at.getsocial.io";
7
+ private $gs_account = "https://getsocial.io";
8
+ private $gs_url_api = "//api.at.getsocial.io";
9
+ public $api_url = "https://getsocial.io/api/v1/";
10
 
11
  function __construct($api_key, $identifier, $lang) {
12
  $this->api_key = $api_key;
131
  return '<div class="getsocial gs-inline-group" ' . $gs_custom_tags . '></div>';
132
  case 'native_bar':
133
  return '<div class="getsocial gs-native-bar" ' . $gs_custom_tags . '></div>';
 
 
134
  case 'social_bar_big_counter':
135
  return '<div class="getsocial gs-inline-group gs-big-counter" ' . $gs_custom_tags . '></div>';
136
  case 'follow_bar':
137
  return '<div class="getsocial gs-inline-group gs-follow" ' . $gs_custom_tags . '></div>';
 
 
138
  case 'reaction_buttons':
139
  return '<div class="getsocial gs-reaction-button"' . $gs_custom_tags . '></div>';
140
  default:
lib/onboarding_popup.php CHANGED
@@ -10,7 +10,6 @@ $plugin_url = admin_url() . '?page=wp-share-buttons-analytics-by-getsocial%2Fini
10
  <!DOCTYPE html>
11
  <html lang="en">
12
  <head>
13
-
14
  <meta charset="UTF-8">
15
  <title>Popup Test</title>
16
 
10
  <!DOCTYPE html>
11
  <html lang="en">
12
  <head>
 
13
  <meta charset="UTF-8">
14
  <title>Popup Test</title>
15
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Share Buttons, Social Sharing & Analytics WordPress Plugin - GetSocial.io ===
2
  Contributors: sharebuttons, socialsharing, socialshare, socialbuttons, socialtools, socialanalytics, GetSocial.io, joaoromao
3
- Tags: share buttons, social sharing, social analytics, share, social media, social, sharing, analytics, button, facebook share, facebook button, like button, tweet button, twitter share, pinterest share, pin button, floating buttons, share, share button, share links, shareaholic, sharethis, social media, social bookmarking, social buttons, social plugin, social share buttons, mobile share bar, mobile sharing, top bar, welcome bar, hello bar, follow buttons, instagram, youtube, increase followers, increase shares, increase traffic, copy paste shares, google analytics integration, yummly, flickr, rss, mailchimp, popup, list builder, infusion soft, bitly, exit intent, time on page, automatic popup, fly-in, exit popup, popup builder, share popup, wordpress popup, subscribe popup, popup on exit, reaction buttons, reactions, reaction bar, virality alerts, alerts, dark social, scheduling, scheduler, automatic social media, automation, automatic facebook, addthis, addtoany, shortener, url shortener, link shortener
4
  Requires at least: 3.0
5
- Tested up to: 4.9.6
6
- Stable tag: 4.1
7
 
8
  Share Buttons and Analytics. Easy WordPress Social Sharing for 30+ social networks.
9
 
@@ -140,7 +140,7 @@ The Tools plan is focused on providing professional share buttons to your websit
140
  - Subscriber Bar (List Builder)
141
  - Extended Customization (Shape, Color, Twitter handle in several apps)
142
  - Social Sharing Analytics (Shares, Referrals, Virality and Engagement)
143
- - MailChimp, Bitly, and Google Analytics Integrations
144
 
145
  **Do you have visits limits?**
146
 
@@ -226,6 +226,9 @@ No, there is not. However, there is a free trial to try free share buttons for 1
226
  9. Analytics for your Social Bars
227
 
228
  == Changelog ==
 
 
 
229
  **4.1**
230
  - Merge Big Counter Bars with Default Sharing Bars
231
  - Change plugin to fit new GetSocial colors
1
  === Share Buttons, Social Sharing & Analytics WordPress Plugin - GetSocial.io ===
2
  Contributors: sharebuttons, socialsharing, socialshare, socialbuttons, socialtools, socialanalytics, GetSocial.io, joaoromao
3
+ Tags: share buttons, social sharing, social analytics, share, social media, social, sharing, analytics, button, facebook share, facebook button, like button, tweet button, twitter share, pinterest share, pin button, floating buttons, share, share button, share links, shareaholic, sharethis, social media, social bookmarking, social buttons, social plugin, social share buttons, mobile share bar, mobile sharing, top bar, welcome bar, hello bar, follow buttons, instagram, youtube, increase followers, increase shares, increase traffic, copy paste shares, google analytics integration, yummly, flickr, rss, mailchimp, popup, list builder, exit intent, time on page, automatic popup, fly-in, exit popup, popup builder, share popup, wordpress popup, subscribe popup, popup on exit, reaction buttons, reactions, reaction bar, virality alerts, alerts, dark social, scheduling, scheduler, automatic social media, automation, automatic facebook, addthis, addtoany, shortener, url shortener, link shortener
4
  Requires at least: 3.0
5
+ Tested up to: 5.1
6
+ Stable tag: 4.1.1
7
 
8
  Share Buttons and Analytics. Easy WordPress Social Sharing for 30+ social networks.
9
 
140
  - Subscriber Bar (List Builder)
141
  - Extended Customization (Shape, Color, Twitter handle in several apps)
142
  - Social Sharing Analytics (Shares, Referrals, Virality and Engagement)
143
+ - MailChimp and Google Analytics Integrations
144
 
145
  **Do you have visits limits?**
146
 
226
  9. Analytics for your Social Bars
227
 
228
  == Changelog ==
229
+ **4.1.1**
230
+ - Remove deprecated networks
231
+
232
  **4.1**
233
  - Merge Big Counter Bars with Default Sharing Bars
234
  - Change plugin to fit new GetSocial colors
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
screenshot-7.png CHANGED
Binary file
screenshot-8.png CHANGED
Binary file
screenshot-9.png CHANGED
Binary file
tmpl/apps.php CHANGED
@@ -81,23 +81,14 @@
81
  <?php // Non Free users can install everything ?>
82
  <?php } else { ?>
83
  <?php
84
- // Prevent instalation of mailchimp app without Price Alert or Subscriber Bar
85
  $prevent_install = "";
86
 
87
  if ($app == 'MailChimp' && !$GS->has_subscriptions()) {
88
- $prevent_install = 'prevent="true"';
89
  } ?>
90
  <a href="<?php echo $settings['href'] ?>" target="<?php echo ($settings['only_activate'] && $app != 'MailChimp' ? '' : '_blank') ?>" class="gs-button gs-primary trans border getsocial-tab <?php echo ($settings['only_activate'] ? 'only-activate' : ''); ?>" <?php echo $prevent_install; ?>>
91
-
92
- <?php echo ($settings['active']) ? 'Edit App' : 'Install App' ?>
93
-
94
- <?php // show woocommerce toogle in price alert ?>
95
- <?php if ($app == 'Price Alert' && !$settings['active']) { ?>
96
- <span class="gs-tooltip">
97
- <img src="<?php echo plugins_url('../img/woocommerce.png', __FILE__ ) ?>" alt="WooCommerce">
98
- <div>Requires WooCommerce Plugin</div>
99
- </span>
100
- <?php } ?>
101
  </a>
102
  <?php } ?>
103
  <?php } ?>
81
  <?php // Non Free users can install everything ?>
82
  <?php } else { ?>
83
  <?php
84
+ // Prevent instalation of mailchimp app without Subscriber Bar
85
  $prevent_install = "";
86
 
87
  if ($app == 'MailChimp' && !$GS->has_subscriptions()) {
88
+ $prevent_install = 'prevent="true"';
89
  } ?>
90
  <a href="<?php echo $settings['href'] ?>" target="<?php echo ($settings['only_activate'] && $app != 'MailChimp' ? '' : '_blank') ?>" class="gs-button gs-primary trans border getsocial-tab <?php echo ($settings['only_activate'] ? 'only-activate' : ''); ?>" <?php echo $prevent_install; ?>>
91
+ <?php echo ($settings['active']) ? 'Edit App' : 'Install App' ?>
 
 
 
 
 
 
 
 
 
92
  </a>
93
  <?php } ?>
94
  <?php } ?>
tmpl/apps_config.php CHANGED
@@ -161,7 +161,7 @@
161
  'active' => $GS->is_active('mailchimp'),
162
  'only_activate' => true,
163
  'href' => $GS->gs_account() . '/auth/mailchimp',
164
- 'desc' => "Automatically connect your Subscriber Bar & Price Alert features with your Mailchimp account"
165
  )
166
  );
167
 
161
  'active' => $GS->is_active('mailchimp'),
162
  'only_activate' => true,
163
  'href' => $GS->gs_account() . '/auth/mailchimp',
164
+ 'desc' => "Automatically connect your Subscriber Bar with your Mailchimp account"
165
  )
166
  );
167
 
uninstall.php CHANGED
@@ -13,13 +13,13 @@ if (defined('WP_UNINSTALL_PLUGIN')) {
13
 
14
  // delete any options or other data stored in the database here
15
  delete_site_option('gs-identifier');
16
- delete_site_option('gs-pro');
17
- delete_site_option('gs-ask-review');
18
  delete_site_option('gs-alert-msg');
19
- delete_site_option('gs-alert-utm');
20
- delete_site_option('gs-alert-cta');
21
  delete_site_option('gs-api-key');
22
- delete_site_option('gs-apps');
23
- delete_site_option('gs-lang');
24
- delete_site_option('gs-has-subscriptions');
25
  }
13
 
14
  // delete any options or other data stored in the database here
15
  delete_site_option('gs-identifier');
16
+ delete_site_option('gs-pro');
17
+ delete_site_option('gs-ask-review');
18
  delete_site_option('gs-alert-msg');
19
+ delete_site_option('gs-alert-utm');
20
+ delete_site_option('gs-alert-cta');
21
  delete_site_option('gs-api-key');
22
+ delete_site_option('gs-apps');
23
+ delete_site_option('gs-lang');
24
+ delete_site_option('gs-has-subscriptions');
25
  }
wp-share-buttons-analytics-getsocial.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Share Buttons & tools to grow traffic by GetSocial.io
4
  * Plugin URI: http://getsocial.io
5
  * Description: Share Buttons by GetSocial.io is a freemium WordPress plugin that enables you to track social shares on Wordpress. Provide beautiful wordpress sharing buttons, track how many shares were made in each post and see how much traffic, conversions and shares each post generated. Optimize your SEO and increase social shares with GetSocial.io.
6
- * Version: 4.1
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: GPL2
@@ -96,10 +96,6 @@ function add_gs_lib() {
96
  echo $GS->getLib();
97
  }
98
 
99
- if (class_exists('WooCommerce')) {
100
- add_action( 'woocommerce_single_product_summary', 'on_product_after_content', 55 );
101
- }
102
-
103
  // check if page builder plugin is installed and change the order of the GS div
104
  $installed_plugins = get_option('active_plugins');
105
 
@@ -111,8 +107,6 @@ if (false !== array_search('siteorigin-panels/siteorigin-panels.php', $installed
111
 
112
  add_filter('the_excerpt','change_excerpt');
113
 
114
- add_action('woocommerce_before_main_content', 'on_post_content', 10);
115
-
116
  // Add GS code to the post excerpts
117
  function change_excerpt($content) {
118
  global $wp_query;
@@ -152,14 +146,14 @@ function change_excerpt($content) {
152
  }
153
 
154
  function on_product_after_content($content) {
155
- echo add_buttons_to_content($content, true, 'bottom');
156
  }
157
 
158
  function on_post_content($content) {
159
- return add_buttons_to_content($content, false);
160
  }
161
 
162
- function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
163
  global $post;
164
 
165
  $getsocial_meta = get_post_custom();
@@ -176,10 +170,6 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
176
  return $content;
177
  }
178
 
179
- if (!$woocomerce && $post->post_type == 'product') {
180
- return $content;
181
- }
182
-
183
  $places = get_option('gs-place');
184
 
185
  $condition = true;
@@ -219,8 +209,6 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
219
 
220
  $groups_active = $GS->is_active('sharing_bar');
221
  $native_active = $GS->is_active('native_bar');
222
- $custom_active = $GS->is_active('custom_actions');
223
- $price_alert_active = $GS->is_active('price_alert');
224
  $big_counter_bar_active = $GS->is_active('social_bar_big_counter');
225
  $follow_bar_active = $GS->is_active('follow_bar');
226
  $reaction_buttons_active = $GS->is_active('reaction_buttons');
@@ -234,7 +222,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
234
  if ($groups_active && $condition):
235
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
236
 
237
- $position = ($wooposition != null ? $wooposition : $GS->prop('sharing_bar', 'position'));
238
 
239
  if($position == 'bottom' || $position == 'both'):
240
  $after_content = $groups;
@@ -248,7 +236,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
248
  if ($reaction_buttons_active && $condition):
249
  $groups = $GS->getCode('reaction_buttons', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
250
 
251
- $position = ($wooposition != null ? $wooposition : $GS->prop('reaction_buttons', 'position'));
252
 
253
  if($position == 'bottom' || $position == 'both'):
254
  $after_content = $groups;
@@ -259,37 +247,10 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
259
  endif;
260
  endif;
261
 
262
- if ($price_alert_active && $wooposition && $condition):
263
-
264
- $product = new WC_Product( get_the_ID() );
265
-
266
- $price = $product->price;
267
-
268
- $price_alert_button = $GS->getCode('price_alert', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), $price, get_woocommerce_currency_symbol());
269
-
270
- $position = $wooposition;
271
-
272
- $after_content = $price_alert_button;
273
- endif;
274
-
275
- if ($custom_active && $condition):
276
- $custom = $GS->getCode('custom_actions', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
277
-
278
- $position = ($wooposition != null ? $wooposition : $GS->prop('custom_actions', 'position'));
279
-
280
- if ($position == 'bottom' || $position == 'both'):
281
- $after_content = $after_content.$custom;
282
- endif;
283
-
284
- if ( $position == 'top' || $position == 'both' ):
285
- $before_content = $before_content.$custom.'<br/>';
286
- endif;
287
- endif;
288
-
289
  if ($big_counter_bar_active && $condition):
290
  $big_counter = $GS->getCode('social_bar_big_counter', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
291
 
292
- $position = ($wooposition != null ? $wooposition : $GS->prop('social_bar_big_counter', 'position'));
293
 
294
  if ($position == 'bottom' || $position == 'both'):
295
  $after_content = $after_content.$big_counter;
@@ -303,7 +264,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
303
  if ($follow_bar_active && $condition_follow):
304
  $follow_bar = $GS->getCode('follow_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
305
 
306
- $position = ($wooposition != null ? $wooposition : $GS->prop('follow_bar', 'position'));
307
 
308
  if ($position == 'bottom' || $position == 'both'):
309
  $after_content = $after_content.$follow_bar;
@@ -317,7 +278,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
317
  if ($native_active && $condition):
318
  $native = $GS->getCode('native_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
319
 
320
- $position = ($wooposition != null ? $wooposition : $GS->prop('native_bar', 'position'));
321
 
322
  if ($position == 'bottom' || $position == 'both'):
323
  $after_content = $after_content.$native;
@@ -333,7 +294,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
333
  if ($groups_active):
334
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
335
 
336
- $position = ($wooposition != null ? $wooposition : $GS->prop('sharing_bar', 'position'));
337
 
338
  if ($position == 'top' || $position == 'bottom' || $position == 'both'):
339
  $after_content = $after_content . $groups;
@@ -343,7 +304,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
343
  if ($reaction_buttons_active):
344
  $groups = $GS->getCode('reaction_buttons', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
345
 
346
- $position = ($wooposition != null ? $wooposition : $GS->prop('reaction_buttons', 'position'));
347
 
348
  if ($position == 'top' || $position == 'bottom' || $position == 'both'):
349
  $after_content = $after_content . $groups;
@@ -353,7 +314,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
353
  if ($big_counter_bar_active):
354
  $big_counter = $GS->getCode('social_bar_big_counter', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
355
 
356
- $position = ($wooposition != null ? $wooposition : $GS->prop('social_bar_big_counter', 'position'));
357
 
358
  if ($position == 'top' || $position == 'bottom' || $position == 'both'):
359
  $after_content = $after_content . $big_counter;
3
  * Plugin Name: Share Buttons & tools to grow traffic by GetSocial.io
4
  * Plugin URI: http://getsocial.io
5
  * Description: Share Buttons by GetSocial.io is a freemium WordPress plugin that enables you to track social shares on Wordpress. Provide beautiful wordpress sharing buttons, track how many shares were made in each post and see how much traffic, conversions and shares each post generated. Optimize your SEO and increase social shares with GetSocial.io.
6
+ * Version: 4.1.1
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: GPL2
96
  echo $GS->getLib();
97
  }
98
 
 
 
 
 
99
  // check if page builder plugin is installed and change the order of the GS div
100
  $installed_plugins = get_option('active_plugins');
101
 
107
 
108
  add_filter('the_excerpt','change_excerpt');
109
 
 
 
110
  // Add GS code to the post excerpts
111
  function change_excerpt($content) {
112
  global $wp_query;
146
  }
147
 
148
  function on_product_after_content($content) {
149
+ echo add_buttons_to_content($content);
150
  }
151
 
152
  function on_post_content($content) {
153
+ return add_buttons_to_content($content);
154
  }
155
 
156
+ function add_buttons_to_content($content) {
157
  global $post;
158
 
159
  $getsocial_meta = get_post_custom();
170
  return $content;
171
  }
172
 
 
 
 
 
173
  $places = get_option('gs-place');
174
 
175
  $condition = true;
209
 
210
  $groups_active = $GS->is_active('sharing_bar');
211
  $native_active = $GS->is_active('native_bar');
 
 
212
  $big_counter_bar_active = $GS->is_active('social_bar_big_counter');
213
  $follow_bar_active = $GS->is_active('follow_bar');
214
  $reaction_buttons_active = $GS->is_active('reaction_buttons');
222
  if ($groups_active && $condition):
223
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
224
 
225
+ $position = $GS->prop('sharing_bar', 'position');
226
 
227
  if($position == 'bottom' || $position == 'both'):
228
  $after_content = $groups;
236
  if ($reaction_buttons_active && $condition):
237
  $groups = $GS->getCode('reaction_buttons', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
238
 
239
+ $position = $GS->prop('reaction_buttons', 'position');
240
 
241
  if($position == 'bottom' || $position == 'both'):
242
  $after_content = $groups;
247
  endif;
248
  endif;
249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  if ($big_counter_bar_active && $condition):
251
  $big_counter = $GS->getCode('social_bar_big_counter', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
252
 
253
+ $position = $GS->prop('social_bar_big_counter', 'position');
254
 
255
  if ($position == 'bottom' || $position == 'both'):
256
  $after_content = $after_content.$big_counter;
264
  if ($follow_bar_active && $condition_follow):
265
  $follow_bar = $GS->getCode('follow_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
266
 
267
+ $position = $GS->prop('follow_bar', 'position');
268
 
269
  if ($position == 'bottom' || $position == 'both'):
270
  $after_content = $after_content.$follow_bar;
278
  if ($native_active && $condition):
279
  $native = $GS->getCode('native_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
280
 
281
+ $position = $GS->prop('native_bar', 'position');
282
 
283
  if ($position == 'bottom' || $position == 'both'):
284
  $after_content = $after_content.$native;
294
  if ($groups_active):
295
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
296
 
297
+ $position = $GS->prop('sharing_bar', 'position');
298
 
299
  if ($position == 'top' || $position == 'bottom' || $position == 'both'):
300
  $after_content = $after_content . $groups;
304
  if ($reaction_buttons_active):
305
  $groups = $GS->getCode('reaction_buttons', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
306
 
307
+ $position = $GS->prop('reaction_buttons', 'position');
308
 
309
  if ($position == 'top' || $position == 'bottom' || $position == 'both'):
310
  $after_content = $after_content . $groups;
314
  if ($big_counter_bar_active):
315
  $big_counter = $GS->getCode('social_bar_big_counter', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
316
 
317
+ $position = $GS->prop('social_bar_big_counter', 'position');
318
 
319
  if ($position == 'top' || $position == 'bottom' || $position == 'both'):
320
  $after_content = $after_content . $big_counter;