Social Media Share Buttons - Version 2.9.2

Version Description

Download this release

Release Info

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

Code changes from version 2.9.1 to 2.9.2

init.php CHANGED
@@ -1,9 +1,7 @@
1
  <div id="gs-master-wrapper">
2
  <?php include('tmpl/header.php'); ?>
3
-
4
  <main data-href="<?php echo $GS->api_url ?>sites/<?php echo get_option('gs-api-key') ?>">
5
  <div class="large">
6
-
7
  <?php if(get_option('gs-api-key') == ''): ?>
8
  <div class="account-info gs-form gs-small">
9
  <div class="form-content">
@@ -25,15 +23,13 @@
25
  </div>
26
  </div>
27
  <div class="form-button-group">
28
- <a href="<?php echo $GS->gs_account() ?>/api/v1/sites/create?source=wordpress&amp;email=<?php echo get_option('admin_email') ?>&amp;url=<?php echo get_option('siteurl') ?>" class="gs-button gs-big gs-success create-gs-account"><i class="fa fa-check"></i> Activate your account</a>
29
  <span class="loading-create gs-button gs-success trans border gs-big hide">
30
  <i class="fa fa-refresh fa-spin"></i> Activating Account...
31
  </span>
32
  </div>
33
  </div>
34
-
35
  <?php include('tmpl/alerts.php') ?>
36
-
37
  <div class="gs-small">
38
  <form id="api-key-form" method="post" class="api-key gs-form gs-small hidden" action="options.php">
39
  <?php settings_fields( 'getsocial-gs-settings' ); ?>
@@ -58,27 +54,19 @@
58
  </div>
59
  </form>
60
  </div>
61
-
62
  <?php else: ?>
63
-
64
  <?php if( !isset($_GET['tab']) ): ?>
65
-
66
  <?php include('tmpl/apps_config.php') ?>
67
  <?php include('tmpl/apps_filters.php') ?>
68
  <?php include('tmpl/alerts.php') ?>
69
  <?php include('tmpl/apps.php') ?>
70
-
71
  <?php else: ?>
72
-
73
  <?php include('tmpl/apps_config.php') ?>
74
  <?php include('tmpl/apps_filters.php') ?>
75
  <?php include('tmpl/alerts.php') ?>
76
  <?php include('tmpl/apps/'.$_GET['tab'].'.php') ?>
77
-
78
  <?php endif; ?>
79
-
80
  <?php endif; ?>
81
-
82
  </div>
83
  </main>
84
  <!-- Settings Modal -->
@@ -90,7 +78,6 @@
90
  <form id="config-form" method="post" action="options.php" class="gs-form">
91
  <?php settings_fields( 'getsocial-gs-settings' ); ?>
92
  <?php do_settings_sections( 'getsocial-gs-settings' ); ?>
93
-
94
  <div class="form-content">
95
  <div class="field-group">
96
  <div class="field-label">
@@ -108,7 +95,6 @@
108
  <p>
109
  Choose where to have your apps displayed. <strong>For now this is limited to Horizontal Sharing Bars</strong>
110
  </p>
111
-
112
  <div class="checkbox-list">
113
  <label><input type="radio" name="gs-place" value="place-posts" <?php echo (get_option('gs-place') == 'place-posts') ? 'checked' : '' ?> /><span>Only Posts</span></label>
114
  </div>
@@ -135,7 +121,6 @@
135
  <p>
136
  Choose where to have your apps displayed.
137
  </p>
138
-
139
  <div class="checkbox-list">
140
  <label><input type="radio" name="gs-place-follow" value="place-posts" <?php echo (get_option('gs-place-follow') == 'place-posts') ? 'checked' : '' ?> /><span>Only Posts</span></label>
141
  </div>
@@ -182,7 +167,6 @@
182
  </a>
183
  <a href="javascript:void(0)" class="gs-button gs-error trans modal-close">Cancel</a>
184
  </div>
185
-
186
  </div>
187
  <div class="modal-cover modal-close"></div>
188
  </div>
@@ -234,7 +218,6 @@
234
  </a>
235
  <a href="javascript:void(0)" class="gs-button gs-error trans modal-close">Cancel</a>
236
  </div>
237
-
238
  </div>
239
  <div class="modal-cover modal-close"></div>
240
  </div>
@@ -264,9 +247,4 @@ if (document.getElementById('contact_us')) {
264
  UserVoice.push(['addTrigger', '#contact_us', { mode: 'contact' }]);
265
  }
266
 
267
-
268
- //UserVoice.push(['addTrigger', '#help2', { mode: 'contact' }]);
269
-
270
- // Autoprompt for Satisfaction and SmartVote (only displayed under certain conditions)
271
- // UserVoice.push(['autoprompt', {}]);
272
  </script>
1
  <div id="gs-master-wrapper">
2
  <?php include('tmpl/header.php'); ?>
 
3
  <main data-href="<?php echo $GS->api_url ?>sites/<?php echo get_option('gs-api-key') ?>">
4
  <div class="large">
 
5
  <?php if(get_option('gs-api-key') == ''): ?>
6
  <div class="account-info gs-form gs-small">
7
  <div class="form-content">
23
  </div>
24
  </div>
25
  <div class="form-button-group">
26
+ <a href="<?php echo $GS->gs_account() ?>/api/v1/sites/create?source=wordpress&amp;email=<?php echo wp_get_current_user()->data->user_email ?>&amp;url=<?php echo get_option('siteurl') ?>" class="gs-button gs-big gs-success create-gs-account"><i class="fa fa-check"></i> Activate your account</a>
27
  <span class="loading-create gs-button gs-success trans border gs-big hide">
28
  <i class="fa fa-refresh fa-spin"></i> Activating Account...
29
  </span>
30
  </div>
31
  </div>
 
32
  <?php include('tmpl/alerts.php') ?>
 
33
  <div class="gs-small">
34
  <form id="api-key-form" method="post" class="api-key gs-form gs-small hidden" action="options.php">
35
  <?php settings_fields( 'getsocial-gs-settings' ); ?>
54
  </div>
55
  </form>
56
  </div>
 
57
  <?php else: ?>
 
58
  <?php if( !isset($_GET['tab']) ): ?>
 
59
  <?php include('tmpl/apps_config.php') ?>
60
  <?php include('tmpl/apps_filters.php') ?>
61
  <?php include('tmpl/alerts.php') ?>
62
  <?php include('tmpl/apps.php') ?>
 
63
  <?php else: ?>
 
64
  <?php include('tmpl/apps_config.php') ?>
65
  <?php include('tmpl/apps_filters.php') ?>
66
  <?php include('tmpl/alerts.php') ?>
67
  <?php include('tmpl/apps/'.$_GET['tab'].'.php') ?>
 
68
  <?php endif; ?>
 
69
  <?php endif; ?>
 
70
  </div>
71
  </main>
72
  <!-- Settings Modal -->
78
  <form id="config-form" method="post" action="options.php" class="gs-form">
79
  <?php settings_fields( 'getsocial-gs-settings' ); ?>
80
  <?php do_settings_sections( 'getsocial-gs-settings' ); ?>
 
81
  <div class="form-content">
82
  <div class="field-group">
83
  <div class="field-label">
95
  <p>
96
  Choose where to have your apps displayed. <strong>For now this is limited to Horizontal Sharing Bars</strong>
97
  </p>
 
98
  <div class="checkbox-list">
99
  <label><input type="radio" name="gs-place" value="place-posts" <?php echo (get_option('gs-place') == 'place-posts') ? 'checked' : '' ?> /><span>Only Posts</span></label>
100
  </div>
121
  <p>
122
  Choose where to have your apps displayed.
123
  </p>
 
124
  <div class="checkbox-list">
125
  <label><input type="radio" name="gs-place-follow" value="place-posts" <?php echo (get_option('gs-place-follow') == 'place-posts') ? 'checked' : '' ?> /><span>Only Posts</span></label>
126
  </div>
167
  </a>
168
  <a href="javascript:void(0)" class="gs-button gs-error trans modal-close">Cancel</a>
169
  </div>
 
170
  </div>
171
  <div class="modal-cover modal-close"></div>
172
  </div>
218
  </a>
219
  <a href="javascript:void(0)" class="gs-button gs-error trans modal-close">Cancel</a>
220
  </div>
 
221
  </div>
222
  <div class="modal-cover modal-close"></div>
223
  </div>
247
  UserVoice.push(['addTrigger', '#contact_us', { mode: 'contact' }]);
248
  }
249
 
 
 
 
 
 
250
  </script>
js/plugin.js CHANGED
@@ -1,7 +1,3 @@
1
- function resizeIframe(obj) {
2
- // obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
3
- }
4
-
5
  function forceUpdate(event){
6
  var data = {
7
  'action': 'gs_update'
@@ -28,10 +24,6 @@ function forceUpdateWithValues(){
28
 
29
  var getsocial_window;
30
 
31
- // function checkForUpdate(){
32
- // getsocial_window.postMessage("needs update?", "*");
33
- // }
34
-
35
  jQuery('.getsocial-tab').on('click', function(e){
36
  e.preventDefault();
37
  $this = jQuery(this);
 
 
 
 
1
  function forceUpdate(event){
2
  var data = {
3
  'action': 'gs_update'
24
 
25
  var getsocial_window;
26
 
 
 
 
 
27
  jQuery('.getsocial-tab').on('click', function(e){
28
  e.preventDefault();
29
  $this = jQuery(this);
lib/gs.php CHANGED
@@ -20,7 +20,7 @@ class GS {
20
  private $gs_url_api = "//api.at.getsocial.io";
21
  public $api_url = "https://getsocial.io/api/v1/";
22
 
23
- function __construct($api_key, $identifier, $lang){
24
  $this->api_key = $api_key;
25
  $this->identifier = $identifier;
26
  $this->lang = $lang == null ? 'en' : $lang;
@@ -30,7 +30,7 @@ class GS {
30
  try {
31
  $r = wp_remote_get($this->api_url.$path, array( 'sslverify' => false ));
32
 
33
- if(is_wp_error($r)):
34
  return null;
35
  endif;
36
 
@@ -44,24 +44,24 @@ class GS {
44
  }
45
  }
46
 
47
- function utms($app){
48
  return '&amp;utm_source=wordpress-user&amp;utm_medium=plugin&amp;utm_term='.get_option('siteurl').'&amp;utm_content='.$app.'&amp;utm_campaign=Wordpress%20Plugin';
49
  }
50
 
51
- function api_url($path){
52
  return $this->api_url.$path;
53
  }
54
 
55
- function getSite(){
56
- if($this->api_key != ''):
57
  return $this->api('sites/'.$this->api_key);
58
  else:
59
  return null;
60
  endif;
61
  }
62
 
63
- function refreshSite($data = null){
64
- if($data == null){
65
  $site = (array) $this->getSite();
66
  } else {
67
  $site = $data;
@@ -72,7 +72,7 @@ class GS {
72
  endif;
73
  }
74
 
75
- function save($site_info){
76
  update_option('gs-identifier', $site_info['identifier']);
77
  update_option('gs-pro', $site_info['pro']);
78
  update_option('gs-apps', json_encode($site_info['gs_apps']));
@@ -83,32 +83,33 @@ class GS {
83
  update_option('gs-alert-cta', $site_info['alert_cta']);
84
  }
85
 
86
- function apps($app_name){
87
  $apps = json_decode(get_option('gs-apps'), true);
88
 
89
- if($apps == null){
90
  return false;
91
  } else {
92
  return (array_key_exists($app_name, $apps) ? $apps[$app_name] : false);
93
  }
94
  }
95
 
96
- function is_pro(){
97
  return get_option('gs-pro');
98
  }
99
 
100
- function is_active($app_name){
101
  $app = $this->apps($app_name);
102
 
103
  return (!empty($app) ? $app['active'] == 'true' : false);
104
  }
105
 
106
- function prop($app_name, $prop){
107
  $app = $this->apps($app_name);
 
108
  return $app[$prop];
109
  }
110
 
111
- function getLib(){
112
  $code = <<<EOF
113
  <script type="text/javascript">
114
  var GETSOCIAL_ID = "$this->identifier";
@@ -124,7 +125,7 @@ EOF;
124
  }
125
 
126
 
127
- function getCode($app_name, $post_url = null, $post_title = null, $post_image = null, $price = null, $currency = null, $add_custom_tags = false){
128
 
129
  $gs_custom_tags = '';
130
 
@@ -155,5 +156,4 @@ EOF;
155
  function gs_account(){
156
  return $this->gs_account;
157
  }
158
-
159
  }
20
  private $gs_url_api = "//api.at.getsocial.io";
21
  public $api_url = "https://getsocial.io/api/v1/";
22
 
23
+ function __construct($api_key, $identifier, $lang) {
24
  $this->api_key = $api_key;
25
  $this->identifier = $identifier;
26
  $this->lang = $lang == null ? 'en' : $lang;
30
  try {
31
  $r = wp_remote_get($this->api_url.$path, array( 'sslverify' => false ));
32
 
33
+ if (is_wp_error($r)):
34
  return null;
35
  endif;
36
 
44
  }
45
  }
46
 
47
+ function utms($app) {
48
  return '&amp;utm_source=wordpress-user&amp;utm_medium=plugin&amp;utm_term='.get_option('siteurl').'&amp;utm_content='.$app.'&amp;utm_campaign=Wordpress%20Plugin';
49
  }
50
 
51
+ function api_url($path) {
52
  return $this->api_url.$path;
53
  }
54
 
55
+ function getSite() {
56
+ if ($this->api_key != ''):
57
  return $this->api('sites/'.$this->api_key);
58
  else:
59
  return null;
60
  endif;
61
  }
62
 
63
+ function refreshSite($data = null) {
64
+ if ($data == null) {
65
  $site = (array) $this->getSite();
66
  } else {
67
  $site = $data;
72
  endif;
73
  }
74
 
75
+ function save($site_info) {
76
  update_option('gs-identifier', $site_info['identifier']);
77
  update_option('gs-pro', $site_info['pro']);
78
  update_option('gs-apps', json_encode($site_info['gs_apps']));
83
  update_option('gs-alert-cta', $site_info['alert_cta']);
84
  }
85
 
86
+ function apps($app_name) {
87
  $apps = json_decode(get_option('gs-apps'), true);
88
 
89
+ if ($apps == null) {
90
  return false;
91
  } else {
92
  return (array_key_exists($app_name, $apps) ? $apps[$app_name] : false);
93
  }
94
  }
95
 
96
+ function is_pro() {
97
  return get_option('gs-pro');
98
  }
99
 
100
+ function is_active($app_name) {
101
  $app = $this->apps($app_name);
102
 
103
  return (!empty($app) ? $app['active'] == 'true' : false);
104
  }
105
 
106
+ function prop($app_name, $prop) {
107
  $app = $this->apps($app_name);
108
+
109
  return $app[$prop];
110
  }
111
 
112
+ function getLib() {
113
  $code = <<<EOF
114
  <script type="text/javascript">
115
  var GETSOCIAL_ID = "$this->identifier";
125
  }
126
 
127
 
128
+ function getCode($app_name, $post_url = null, $post_title = null, $post_image = null, $price = null, $currency = null, $add_custom_tags = false) {
129
 
130
  $gs_custom_tags = '';
131
 
156
  function gs_account(){
157
  return $this->gs_account;
158
  }
 
159
  }
readme.txt CHANGED
@@ -1,61 +1,59 @@
1
- === Social Sharing, Follow Bar & Share Buttons by GetSocial.io ===
2
  Contributors: GetSocial.io, joaoromao
3
 
4
- Tags: addthis, addtoany, analytics, button, facebook share, facebook button, like button, tweet button, twitter share, pinterest share, pin button, floating buttons, share, share button, share buttons, share links, shareaholic, sharethis, sharing, social, social analytics, social media, social bookmarking, social buttons, social media, social plugin, social share, social share buttons, social sharing, 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
5
 
6
  Requires at least: 3.0
7
  Tested up to: 4.3
8
- Stable tag: 2.9.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- All in one plugin with tools to grow your traffic, shares and followers. Includes mobile bar (paid) & more. Support is FREE & Quick
13
 
14
  == Description ==
15
 
16
- **Social Sharing Buttons by GetSocial.io** is a freemium WordPress all in one toolkit to help you grow your shares, traffic and followers. Get more Visitors, Conversions, Subscribers, Shares and Revenue from your site. Increase your shares, followers & conversions with GetSocial. **This is a freemium plugin so there are some free apps and some paid apps, depending on your needs** Now integrating with MailChimp.
17
 
18
-
19
 
20
- **Integration with MailChimpt**: As of October/2015 we started providing a native integration with MailChimp to our paid customers. Users of the Subscriber Bar & Price Alert features (both paid) are now able to push emails automatically, in real-time, to their MailChimp lists.
 
 
21
 
22
-
23
 
24
- <h4>Free & Paid plans:</h4> GetSocial provides a free version and 3 paid versions. Here's the breakdown of features and visits limit involved in each plan:
 
 
25
 
26
  <h4>List of Free Features</h4>
27
- - Horizontal Sharing Bar
28
  - Native Sharing Bar
29
- - Floating Sharing Bar
30
  - Welcome Bar
31
- - Custom Facebook Shares
32
- - Horizontal Follow Bar
33
- - Floating Follow Bar
34
- - Most Shared Pages
35
 
36
  <h4>List of Paid Features</h4>
37
- - Mobile Share Bar
38
- - Mobile Follow Bar
39
  - Image Sharing
40
- - Big Total Shares Horizontal & Floating
41
- - Subscribe Bar
 
 
42
  - Price Alert
43
  - Extended Customization (Shape, Color, Twitter handle in several apps)
44
- - Address Bar Tracking
45
  - Conversion Tracking
46
- - Google Analytics Integration
47
- - Social Sharing Analytics
48
- - MailChimp Integration
49
 
50
  <h4>Visits Limit</h4>
51
  - Free: 10,000 per month;
52
- - Starter: 30,000 per month;
53
  - Growth: 100,000 per month;
54
  - Insights: 1,000,000 per month.
55
 
56
- -
57
-
58
- Our apps include native & customizable share buttons, welcome & subscribe bars, conversion tracking, copy paste share tracking and much more. You can find more info about our product <a href="http://getsocial.io/?utm_source=wordpress_plugin">here</a>. This app store is organized in 5 different categories:
59
 
60
  * **Social Sharing Tools**: You'll find 5 apps focused on improving, optimizing and streamlining the number of shares made on your website. A/B test the placement of your share buttons and increase your referral traffic coming from social networks. Track dark social sharing (copy paste) and enable mobile sharing to your mobile users.
61
 
@@ -103,6 +101,9 @@ In this plugin, you'll find these categories:
103
 
104
  * **Copy Paste Share tracking**: Tracking social media in alternative methods such as SMS, Chat or Copy & Paste URL (Dark Social) will allow you to effectively measure social media ROI. Understand how many shares are being made without using social sharing buttons. Get share information on shares made through copy & paste, facebook messenger and other chat applications, email and twitter management tools.
105
 
 
 
 
106
  <h4>eCommerce specific </h4>
107
 
108
  * **WooCommerce Integrated**: GetSocial integrates seamlessly with eCommerce. Streamline your social share activities for your eCommerce store without handling a single line of code. Improve conversion rates, traffic and shares to your online shop.
@@ -116,7 +117,7 @@ Also, there's a tutorial on how to install this plugin in your Wordpress Account
116
  For an automatic installation through WordPress:
117
 
118
  1. Go to the "Plugins" menu in your left sidebar, and click "Add New" link.
119
- 2. Search for 'Share Buttons & Analytics by GetSocial'
120
  3. Click 'Install Now' and activate the plugin
121
  4. On the left bar a menu item 'GetSocial' will appear.
122
 
@@ -132,21 +133,11 @@ For a manual installation:
132
 
133
  GetSocial is an all-in-one social media toolkit that helps websites increase their traffic, shares, followers and conversions. It is a set of apps that a user can easily install in a website.
134
 
135
- There are a total of 15 apps across 5 categories: Sharing, Tracking, Engagement, eCommerce and Integration apps.
136
 
137
  **How do I install GetSocial?**
138
 
139
- We've made our best to make the installation process as seamless as it can be. If you created an account through our website, you'll be asked to place a bit of code on your website, just like Google Analytics or any other similar service.
140
-
141
- If you are familiar with it, you can use Google Tag Manager for easily do this. After installing our snippet of code, you'll have access to some 1-click install apps on our app store.
142
-
143
- If you're using WordPress download our plugin at <a href='http://goo.gl/bdgOLN'>http://goo.gl/bdgOLN</a>.
144
-
145
- **Do I need to to handle code?**
146
-
147
- If you're not comfortable around code and if we've failed to help you with our tutorials, we strongly recommend using one of our plugins (<a href='http://getsocial.io/tutorials/wordpress'>check them here</a>).
148
-
149
- We've developed a social sharing plugin focused on content, specifically on **Wordpress** websites which you can download at: <a class='link_only' href='http://goo.gl/bdgOLN'>http://goo.gl/bdgOLN</a>.
150
 
151
  **Do you provide free support? How much does it cost?**
152
 
@@ -186,40 +177,37 @@ Included in the free package is also our basic 'Most Shared Pages' panel. This w
186
 
187
  The Free and paid plans differ in the access to certain features. GetSocial paid users have higher visit limits and priority in support. Within the product, there are some customizations and features that they also have unique access to.
188
 
189
- <h4>List of Free Apps:</h4>
190
- - Horizontal Sharing Bar
191
  - Native Sharing Bar
192
- - Floating Sharing Bar
193
  - Welcome Bar
194
- - Custom Facebook Shares
195
- - Horizontal Follow Bar
196
- - Floating Follow Bar
197
- - Most Shared Pages
198
 
199
- <h4>List of Paid Apps:</h4>
200
- - Mobile Share Bar
201
- - Mobile Follow Bar
202
  - Image Sharing
203
- - Big Total Shares Horizontal & Floating
204
- - Subscribe Bar
 
 
205
  - Price Alert
206
  - Extended Customization (Shape, Color, Twitter handle in several apps)
207
- - Address Bar Tracking
208
  - Conversion Tracking
209
- - Google Analytics Integration
210
- - Social Sharing Analytics
211
 
212
  **Do you have a visit limit for my website?**
213
 
214
  Yes. As every new website that registers with GetSocial is also a new cost for us, we must regulate the number of visitors for the websites who use us. However, visits limits change according to your plan.
215
 
216
- **FREE Plan:** If you're using our free plan, your limit is 50,000 visits per month. Once you reach this limit you'll be notified via email. If you don't upgrade to a paid plan, we'll stop the service to your website. This means that all the apps you have installed will become inactive.
217
 
218
- **Starter Plan:** The Starter plan has a higher limit and can get up to 25,000 visits per month. After reaching this limit we'll charge $5 for every 25,000 new visits. You can opt-out from the extra-vists packages in your Site Options area. If you do, we'll stop serving our apps once the limit is reached.
219
 
220
- **Growth Plan:** The Growth plan expands the visit limit to 100,000 visits per month. After reaching this limit we'll charge $15 for every 25,000 new visits.
221
 
222
- **Insights Plan:** The Insights plan expands the visit limit to 1,000,000 visits per month. After reaching this limit we'll charge $199 for every 1,000,000 new visits.
223
 
224
  **How much does the paid versions cost?**
225
 
@@ -296,6 +284,10 @@ Sure, we’re always here to help. You can contact us at support@getsocial.io or
296
 
297
  == Changelog ==
298
 
 
 
 
 
299
  **2.9.1**
300
 
301
  - Added Google Analitycs App
1
+ === Social Sharing, Smart Popup & Share Buttons by GetSocial.io ===
2
  Contributors: GetSocial.io, joaoromao
3
 
4
+ Tags: addthis, addtoany, analytics, button, facebook share, facebook button, like button, tweet button, twitter share, pinterest share, pin button, floating buttons, share, share button, share buttons, share links, shareaholic, sharethis, sharing, social, social analytics, social media, social bookmarking, social buttons, social media, social plugin, social share, social share buttons, social sharing, 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
5
 
6
  Requires at least: 3.0
7
  Tested up to: 4.3
8
+ Stable tag: 2.9.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ 18 easy to install tools to grow your traffic, shares & subscribers, including mobile share bar (paid) & Smart Popups.
13
 
14
  == Description ==
15
 
16
+ **Social Sharing, Smart Popup & Share Buttons by GetSocial.io** is a freemium WordPress all in one toolkit to help you grow your traffic, shares & subscribers. We have 18 tools, no code needed to install, which will help you increase shares per post, social media followers, website conversions and newsletter subscribers. **This is a freemium plugin so there are some free apps and some paid apps, depending on your needs**
17
 
18
+ We also **increase your visitors' engagement** with Hello Buddy, our smart popup feature. With Hello Buddy you are able to ask your customers to share, subscribe or visit a specific page. Smart popups are highly customizable (some customization is paid) and can be triggered by:
19
 
20
+ - Time Spent on Site
21
+ - % of page scrolled
22
+ - Exit Intention
23
 
24
+ It's a super flexible tool that can help you reach your goals, faster!
25
 
26
+ [youtube https://www.youtube.com/watch?v=wDZvmwHk6FA]
27
+
28
+ Regarding the rest of the toolkit, GetSocial provides about 18 features, among tools & integrations.
29
 
30
  <h4>List of Free Features</h4>
31
+ - Horizontal & FLoating Share Bar
32
  - Native Sharing Bar
 
33
  - Welcome Bar
34
+ - Custom Facebook Shares (Wish, Want, Have, etc)
35
+ - Horizontal & Floating Follow Bar
 
 
36
 
37
  <h4>List of Paid Features</h4>
38
+ - Mobile Share & Follow Bar
 
39
  - Image Sharing
40
+ - Total Shares Horizontal & Floating
41
+ - Copy Paste Share Tracking
42
+ - Google Analytics Integration
43
+ - Subscriber Bar (List Builder)
44
  - Price Alert
45
  - Extended Customization (Shape, Color, Twitter handle in several apps)
 
46
  - Conversion Tracking
47
+ - Social Sharing Analytics (Shares, Referrals and cool stats about users' engagement)
48
+ - MailChimp, Bitly & Infusionsoft Integrations
 
49
 
50
  <h4>Visits Limit</h4>
51
  - Free: 10,000 per month;
52
+ - Starter: 25,000 per month;
53
  - Growth: 100,000 per month;
54
  - Insights: 1,000,000 per month.
55
 
56
+ Our apps include native & customizable share buttons, welcome & subscribe bars, conversion tracking, copy paste share tracking and much more. You can find more info about our product <a href="http://getsocial.io/?utm_source=plugin_listings&utm_medium=wordpress&utm_campaign=app_listing">here</a>. This app store is organized in 5 different categories:
 
 
57
 
58
  * **Social Sharing Tools**: You'll find 5 apps focused on improving, optimizing and streamlining the number of shares made on your website. A/B test the placement of your share buttons and increase your referral traffic coming from social networks. Track dark social sharing (copy paste) and enable mobile sharing to your mobile users.
59
 
101
 
102
  * **Copy Paste Share tracking**: Tracking social media in alternative methods such as SMS, Chat or Copy & Paste URL (Dark Social) will allow you to effectively measure social media ROI. Understand how many shares are being made without using social sharing buttons. Get share information on shares made through copy & paste, facebook messenger and other chat applications, email and twitter management tools.
103
 
104
+ * **Hello Buddy**: Our smart popup builder. Take advantage of the features you already know about (Sharing Bar, Subscriber Bar & Welcome Bar) and build the perfect popup for your website. Decide when it gets triggered, how frequently it gets shown and when should it stop being triggered. Great to build your email lists or push a specific promotion.
105
+
106
+
107
  <h4>eCommerce specific </h4>
108
 
109
  * **WooCommerce Integrated**: GetSocial integrates seamlessly with eCommerce. Streamline your social share activities for your eCommerce store without handling a single line of code. Improve conversion rates, traffic and shares to your online shop.
117
  For an automatic installation through WordPress:
118
 
119
  1. Go to the "Plugins" menu in your left sidebar, and click "Add New" link.
120
+ 2. Search for 'Social Sharing, Smart Popup & Share Buttons by GetSocial.io'
121
  3. Click 'Install Now' and activate the plugin
122
  4. On the left bar a menu item 'GetSocial' will appear.
123
 
133
 
134
  GetSocial is an all-in-one social media toolkit that helps websites increase their traffic, shares, followers and conversions. It is a set of apps that a user can easily install in a website.
135
 
136
+ There are a total of 18 apps across 5 categories: Sharing, Tracking, Engagement, eCommerce and Integration apps.
137
 
138
  **How do I install GetSocial?**
139
 
140
+ Through our Wordpress Plugin, all apps are available **code free**, which means you'll be able to install every single one of them withough having to open even once the code editor.
 
 
 
 
 
 
 
 
 
 
141
 
142
  **Do you provide free support? How much does it cost?**
143
 
177
 
178
  The Free and paid plans differ in the access to certain features. GetSocial paid users have higher visit limits and priority in support. Within the product, there are some customizations and features that they also have unique access to.
179
 
180
+ <h4>List of Free Features</h4>
181
+ - Horizontal & FLoating Share Bar
182
  - Native Sharing Bar
 
183
  - Welcome Bar
184
+ - Custom Facebook Shares (Wish, Want, Have, etc)
185
+ - Horizontal & Floating Follow Bar
 
 
186
 
187
+ <h4>List of Paid Features</h4>
188
+ - Mobile Share & Follow Bar
 
189
  - Image Sharing
190
+ - Total Shares Horizontal & Floating
191
+ - Copy Paste Share Tracking
192
+ - Google Analytics Integration
193
+ - Subscriber Bar (List Builder)
194
  - Price Alert
195
  - Extended Customization (Shape, Color, Twitter handle in several apps)
 
196
  - Conversion Tracking
197
+ - Social Sharing Analytics (Shares, Referrals and cool stats about users' engagement)
198
+ - MailChimp, Bitly & Infusionsoft Integrations
199
 
200
  **Do you have a visit limit for my website?**
201
 
202
  Yes. As every new website that registers with GetSocial is also a new cost for us, we must regulate the number of visitors for the websites who use us. However, visits limits change according to your plan.
203
 
204
+ **FREE Plan:** If you're using our free plan, your limit is 10,000 visits per month. Once you reach this limit you'll be notified via email. If you don't upgrade to a paid plan, we'll stop the service to your website. This means that all the apps you have installed will become inactive.
205
 
206
+ **Starter Plan:** The Starter plan has a higher limit and can get up to 25,000 visits per month and costs $9 per month. After reaching this limit we'll charge $5 for every 25,000 new visits. You can opt-out from the extra-vists packages in your Site Options area. If you do, we'll stop serving our apps once the limit is reached.
207
 
208
+ **Growth Plan:** The Growth plan expands the visit limit to 100,000 visits per month and costs $29 per month. After reaching this limit we'll charge $15 for every 100,000 new visits.
209
 
210
+ **Insights Plan:** The Insights plan expands the visit limit to 1,000,000 visits per month and costs $99 per month. After reaching this limit we'll charge $199 for every 1,000,000 new visits.
211
 
212
  **How much does the paid versions cost?**
213
 
284
 
285
  == Changelog ==
286
 
287
+ **2.9.2**
288
+
289
+ - Fix API urls
290
+
291
  **2.9.1**
292
 
293
  - Added Google Analitycs App
screenshot-2.png CHANGED
Binary file
screenshot-9.png CHANGED
Binary file
tmpl/alerts.php CHANGED
@@ -1,11 +1,10 @@
1
- <?php if(get_option('gs-api-key') == ''): ?>
2
  <div class="notification-bar starting alert-block inline gs-success hidden">
3
  <div class="alert-info">
4
  <p class="alert-title">Congratulations!</p>
5
  <p>You are ready to start in 3..2..1..</p>
6
  </div>
7
  </div>
8
-
9
  <div class="notification-bar alert-block inline gs-error hidden">
10
  <div class="alert-info no-desc">
11
  <p class="alert-title"></p>
@@ -13,7 +12,7 @@
13
  </div>
14
  <?php endif; ?>
15
 
16
- <?php if(!$GS->is_pro() && get_option('gs-alert-msg')): ?>
17
  <div class="alert-block center large plan-two">
18
  <div class="alert-info">
19
  <p class="alert-title"><?php echo get_option('gs-alert-msg') ?></p>
@@ -22,7 +21,7 @@
22
  </div>
23
  <?php endif; ?>
24
 
25
- <?php if( isset($_GET['update']) || isset($_GET['delete']) ): ?>
26
  <div class="notification-bar alert-block inline gs-success">
27
  <div class="alert-info no-desc">
28
  <p class="alert-title">App <?php echo isset($_GET['update']) ? 'updated' : 'deactivated' ?> with success</p>
@@ -31,7 +30,7 @@
31
  </div>
32
  <?php endif; ?>
33
 
34
- <?php if( isset($_GET['settings-updated']) && $_GET['settings-updated'] == true): ?>
35
  <div class="notification-bar alert-block inline gs-success">
36
  <div class="alert-info no-desc">
37
  <p class="alert-title">Preferences updated successfully</p>
1
+ <?php if (get_option('gs-api-key') == ''): ?>
2
  <div class="notification-bar starting alert-block inline gs-success hidden">
3
  <div class="alert-info">
4
  <p class="alert-title">Congratulations!</p>
5
  <p>You are ready to start in 3..2..1..</p>
6
  </div>
7
  </div>
 
8
  <div class="notification-bar alert-block inline gs-error hidden">
9
  <div class="alert-info no-desc">
10
  <p class="alert-title"></p>
12
  </div>
13
  <?php endif; ?>
14
 
15
+ <?php if (!$GS->is_pro() && get_option('gs-alert-msg')): ?>
16
  <div class="alert-block center large plan-two">
17
  <div class="alert-info">
18
  <p class="alert-title"><?php echo get_option('gs-alert-msg') ?></p>
21
  </div>
22
  <?php endif; ?>
23
 
24
+ <?php if (isset($_GET['update']) || isset($_GET['delete'])): ?>
25
  <div class="notification-bar alert-block inline gs-success">
26
  <div class="alert-info no-desc">
27
  <p class="alert-title">App <?php echo isset($_GET['update']) ? 'updated' : 'deactivated' ?> with success</p>
30
  </div>
31
  <?php endif; ?>
32
 
33
+ <?php if (isset($_GET['settings-updated']) && $_GET['settings-updated'] == true): ?>
34
  <div class="notification-bar alert-block inline gs-success">
35
  <div class="alert-info no-desc">
36
  <p class="alert-title">Preferences updated successfully</p>
tmpl/apps.php CHANGED
@@ -17,23 +17,21 @@
17
  <?php if($settings['category'] == $cat): ?>
18
  <div class="app-link-wrapper <?php if($settings['nocode']){ echo 'filter-nocode'; } ?> filter-<?php echo plan_class($settings['plan']); ?> filter-<?php echo $settings['category']; ?>">
19
  <div class="app-link">
20
- <?php if($settings['nocode']): ?>
21
  <div class="app-badge nocode">No Code</div>
22
  <?php endif; ?>
23
-
24
  <div class="app-badge-group">
25
- <?php if($settings['new']): ?>
26
  <div class="app-badge new">New</div>
27
  <?php endif; ?>
28
- <?php if($plan_current == 'one' && $settings['plan'] > 1): ?>
29
  <div class="app-badge plan-<?php echo plan_class($settings['plan']); ?>">
30
  <?php echo plan_name($settings['plan']); ?>
31
  </div>
32
  <?php endif; ?>
33
  </div>
34
-
35
  <div class="app-image">
36
- <?php if($settings['active']): ?>
37
  <div class="installed">
38
  <span>
39
  <i class="fa fa-check-circle"></i>
@@ -41,33 +39,30 @@
41
  </span>
42
  </div>
43
  <?php endif; ?>
44
- <img src="<?php echo plugins_url( '../img/apps/'.$settings['file'].'.png', __FILE__ ) ?>" alt="">
45
  </div>
46
-
47
  <div class="app-link-info">
48
  <p class="app-title"><span><?php echo $app ?></span></p>
49
  <p><?php echo $settings['desc'] ?></p>
50
  </div>
51
  <div class="app-link-buttons">
52
  <div>
53
- <?php if(!$settings['only_activate'] || ( isset($settings['only_activate']) && !$settings['active'] )): ?>
54
-
55
  <?php // Show modals when user is free and apps are activate only ?>
56
- <?php if (!$GS->is_pro() && $settings['only_activate']): ?>
57
-
58
- <?php if($app == 'Copy Paste Share Tracking'): ?>
59
  <a id="install-copy-and-share" href="#" class="gs-button gs-primary trans border getsocial-tab only-activate">
60
  Install App
61
  </a>
62
  <?php endif; ?>
63
 
64
- <?php if($app == 'Google Analytics'): ?>
65
  <a id="install-ga-analytics" href="#" class="gs-button gs-primary trans border getsocial-tab only-activate">
66
  Install App
67
  </a>
68
  <?php endif; ?>
69
 
70
- <?php if($app == 'MailChimp'): ?>
71
  <a id="install-mailchimp" href="#" class="gs-button gs-primary trans border getsocial-tab only-activate">
72
  Install App
73
  </a>
@@ -78,7 +73,7 @@
78
  // Prevent instalation of mailchimp app without Price Alert or Subscriber Bar
79
  $prevent_install = "";
80
 
81
- if($app == 'MailChimp' && !$apps['Price Alert']['active'] && !$apps['Subscriber Bar']['active']):
82
  $prevent_install = 'prevent="true"';
83
  endif; ?>
84
  <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; ?>>
@@ -86,7 +81,7 @@
86
  <?php echo ($settings['active']) ? 'Edit App' : 'Install App' ?>
87
 
88
  <?php // show woocommerce toogle in price alert ?>
89
- <?php if($app == 'Price Alert' && !$settings['active']): ?>
90
  <span class="gs-tooltip">
91
  <img src="<?php echo plugins_url('../img/woocommerce.png', __FILE__ ) ?>" alt="WooCommerce">
92
  <div>Requires WooCommerce Plugin</div>
@@ -96,7 +91,7 @@
96
  <?php endif; ?>
97
  <?php endif; ?>
98
 
99
- <?php if($settings['active']): ?>
100
  <a href="javascript:void(0)" class="gs-button disable trans border stop deactivate" data-disable-app="<?php echo $GS->api_url('sites/disable/'.get_option('gs-api-key').'/'.$settings['file']) ?>">
101
  Deactivate
102
  </a>
@@ -116,7 +111,7 @@
116
  <footer>
117
  <a id="gs-backToTop" href="javascript:void(0)" class="gs-button gs-primary"><i class="fa fa-angle-up"></i> Back to Top</a>
118
 
119
- <?php if(!$GS->is_pro()): ?>
120
  &nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;&nbsp;&nbsp;&nbsp;
121
  <a href="<?php echo $GS->gs_account() ?>/sites/gs-wordpress/billing/select_tier?api_key=<?php echo $GS->api_key ?>&amp;source=wordpress" target="_blank" class="gs-button plan-two">Upgrade to STARTER</a>
122
  <?php endif; ?>
17
  <?php if($settings['category'] == $cat): ?>
18
  <div class="app-link-wrapper <?php if($settings['nocode']){ echo 'filter-nocode'; } ?> filter-<?php echo plan_class($settings['plan']); ?> filter-<?php echo $settings['category']; ?>">
19
  <div class="app-link">
20
+ <?php if ($settings['nocode']): ?>
21
  <div class="app-badge nocode">No Code</div>
22
  <?php endif; ?>
 
23
  <div class="app-badge-group">
24
+ <?php if ($settings['new']): ?>
25
  <div class="app-badge new">New</div>
26
  <?php endif; ?>
27
+ <?php if ($plan_current == 'one' && $settings['plan'] > 1): ?>
28
  <div class="app-badge plan-<?php echo plan_class($settings['plan']); ?>">
29
  <?php echo plan_name($settings['plan']); ?>
30
  </div>
31
  <?php endif; ?>
32
  </div>
 
33
  <div class="app-image">
34
+ <?php if ($settings['active']): ?>
35
  <div class="installed">
36
  <span>
37
  <i class="fa fa-check-circle"></i>
39
  </span>
40
  </div>
41
  <?php endif; ?>
42
+ <img src="<?php echo plugins_url('../img/apps/'.$settings['file'].'.png', __FILE__) ?>" alt="">
43
  </div>
 
44
  <div class="app-link-info">
45
  <p class="app-title"><span><?php echo $app ?></span></p>
46
  <p><?php echo $settings['desc'] ?></p>
47
  </div>
48
  <div class="app-link-buttons">
49
  <div>
50
+ <?php if (!$settings['only_activate'] || ( isset($settings['only_activate']) && !$settings['active'] )): ?>
 
51
  <?php // Show modals when user is free and apps are activate only ?>
52
+ <?php if (!$GS->is_pro() && $settings['only_activate']): ?>
53
+ <?php if ($app == 'Copy Paste Share Tracking'): ?>
 
54
  <a id="install-copy-and-share" href="#" class="gs-button gs-primary trans border getsocial-tab only-activate">
55
  Install App
56
  </a>
57
  <?php endif; ?>
58
 
59
+ <?php if ($app == 'Google Analytics'): ?>
60
  <a id="install-ga-analytics" href="#" class="gs-button gs-primary trans border getsocial-tab only-activate">
61
  Install App
62
  </a>
63
  <?php endif; ?>
64
 
65
+ <?php if ($app == 'MailChimp'): ?>
66
  <a id="install-mailchimp" href="#" class="gs-button gs-primary trans border getsocial-tab only-activate">
67
  Install App
68
  </a>
73
  // Prevent instalation of mailchimp app without Price Alert or Subscriber Bar
74
  $prevent_install = "";
75
 
76
+ if ($app == 'MailChimp' && !$apps['Price Alert']['active'] && !$apps['Subscriber Bar']['active']):
77
  $prevent_install = 'prevent="true"';
78
  endif; ?>
79
  <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; ?>>
81
  <?php echo ($settings['active']) ? 'Edit App' : 'Install App' ?>
82
 
83
  <?php // show woocommerce toogle in price alert ?>
84
+ <?php if ($app == 'Price Alert' && !$settings['active']): ?>
85
  <span class="gs-tooltip">
86
  <img src="<?php echo plugins_url('../img/woocommerce.png', __FILE__ ) ?>" alt="WooCommerce">
87
  <div>Requires WooCommerce Plugin</div>
91
  <?php endif; ?>
92
  <?php endif; ?>
93
 
94
+ <?php if ($settings['active']): ?>
95
  <a href="javascript:void(0)" class="gs-button disable trans border stop deactivate" data-disable-app="<?php echo $GS->api_url('sites/disable/'.get_option('gs-api-key').'/'.$settings['file']) ?>">
96
  Deactivate
97
  </a>
111
  <footer>
112
  <a id="gs-backToTop" href="javascript:void(0)" class="gs-button gs-primary"><i class="fa fa-angle-up"></i> Back to Top</a>
113
 
114
+ <?php if (!$GS->is_pro()): ?>
115
  &nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;&nbsp;&nbsp;&nbsp;
116
  <a href="<?php echo $GS->gs_account() ?>/sites/gs-wordpress/billing/select_tier?api_key=<?php echo $GS->api_key ?>&amp;source=wordpress" target="_blank" class="gs-button plan-two">Upgrade to STARTER</a>
117
  <?php endif; ?>
tmpl/apps_config.php CHANGED
@@ -22,7 +22,7 @@
22
  'plan' => 1,
23
  'active' => $GS->is_active('sharing_bar'),
24
  'only_activate' => false,
25
- 'href' => $GS->gs_account().'/sites/gs-wordpress/groups/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('sharing-bar'),
26
  'desc' => "Use one of our templates or design your own social sharing bar. Customize size, shape & colour and pick from 15 social networks."
27
  ),
28
  'Mobile Sharing Bar' => array(
@@ -33,7 +33,7 @@
33
  'plan' => 2,
34
  'active' => $GS->is_active('mobile_bar'),
35
  'only_activate' => false,
36
- 'href' => $GS->gs_account().'/sites/gs-wordpress/mobile_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('mobile-bar'),
37
  "desc" => "Mobile Web is one of the fastest growing platform both in traffic and shares. Don't miss out on the opportunity to boost your traffic with our slick mobile web sharing interface. No code needed."
38
  ),
39
  'Floating Sharing Bar' => array(
@@ -44,7 +44,7 @@
44
  'plan' => 1,
45
  'active' => $GS->is_active('floating_bar'),
46
  'only_activate' => false,
47
- 'href' => $GS->gs_account().'/sites/gs-wordpress/floating_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('floating-bar'),
48
  "desc" => "Use one of our templates or design your own floating sharing bar. Customize size, shape & placement and pick from 15 social networks."
49
  ),
50
  'Image Sharing' => array(
@@ -55,7 +55,7 @@
55
  'plan' => 2,
56
  'active' => $GS->is_active('image_sharing'),
57
  'only_activate' => false,
58
- 'href' => $GS->gs_account().'/sites/gs-wordpress/image_sharing/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('image-sharing'),
59
  "desc" => "Increase shares on images on your website. Great for media-based websites."
60
  ),
61
  'Copy Paste Share Tracking' => array(
@@ -66,7 +66,7 @@
66
  'plan' => 2,
67
  'active' => $GS->is_active('address_tracking'),
68
  'only_activate' => true,
69
- 'href' => $GS->api_url('sites/activate/'.get_option('gs-api-key').'/address-tracker'),
70
  "desc" => "Don't lose track of shares made through copying and pasting an URL on the address bar to social networks, email or other platforms."
71
  ),
72
  'Native Sharing Bar' => array(
@@ -77,7 +77,7 @@
77
  'plan' => 1,
78
  'active' => $GS->is_active('native_bar'),
79
  'only_activate' => false,
80
- 'href' => $GS->gs_account().'/sites/gs-wordpress/native_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('native-bar'),
81
  'desc' => "It doesn't get much more classic than this. Your native sharing buttons with tracking abilities. Great for those who want to keep it real."
82
  ),
83
  'Horizontal Follow Bar' => array(
@@ -88,7 +88,7 @@
88
  'plan' => 1,
89
  'active' => $GS->is_active('follow_bar'),
90
  'only_activate' => false,
91
- 'href' => $GS->gs_account().'/sites/gs-wordpress/follow_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('follow-bar'),
92
  'desc' => "Grow your follower base in Facebook, Twitter, Pinterest and more with these beautiful free follow buttons."
93
  ),
94
  'Floating Follow Bar' => array(
@@ -99,7 +99,7 @@
99
  'plan' => 1,
100
  'active' => $GS->is_active('floating_follow_bar'),
101
  'only_activate' => false,
102
- 'href' => $GS->gs_account().'/sites/gs-wordpress/follow_floating_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('floating-follow-bar'),
103
  'desc' => "Grow your follower base in Facebook, Twitter, Pinterest and more with these beautiful free follow buttons."
104
  ),
105
  'Mobile Follow Bar' => array(
@@ -110,7 +110,7 @@
110
  'plan' => 2,
111
  'active' => $GS->is_active('mobile_follow_bar'),
112
  'only_activate' => false,
113
- 'href' => $GS->gs_account().'/sites/gs-wordpress/follow_mobile_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('mobile-follow-bar'),
114
  'desc' => "Don't miss out on the opportunity to convert mobile visitors into brand followers with our mobile follow buttons."
115
  ),
116
  'Welcome Bar' => array(
@@ -121,7 +121,7 @@
121
  'plan' => 1,
122
  'active' => $GS->is_active('welcome_bar'),
123
  'only_activate' => false,
124
- 'href' => $GS->gs_account().'/sites/gs-wordpress/welcome_bars/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('welcome-bar'),
125
  "desc" => "Easily lead your visitors to a specific link. Great to generate conversions, engage with promotions and increase traffic. No code needed."
126
  ),
127
  'Subscriber Bar' => array(
@@ -132,7 +132,7 @@
132
  'plan' => 2,
133
  'active' => $GS->is_active('subscriber_bar'),
134
  'only_activate' => false,
135
- 'href' => $GS->gs_account().'/sites/gs-wordpress/subscribe_bars/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('subscriber-bar'),
136
  "desc" => "Easily capture emails from your visitors by providing them with an engaging top bar. Export data to your favorite CRM or e-Mail marketing software."
137
  ),
138
  'Big Total Shares Horizontal' => array(
@@ -143,7 +143,7 @@
143
  'plan' => 2,
144
  'active' => $GS->is_active('social_bar_big_counter'),
145
  'only_activate' => false,
146
- 'href' => $GS->gs_account().'/sites/gs-wordpress/big_counter_sharing_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('social-bar-big-counter'),
147
  'desc' => "Increase engagement by showing the total number of shares in a big counter on the left of your horizontal share bar."
148
  ),
149
  'Big Total Shares Floating' => array(
@@ -154,7 +154,7 @@
154
  'plan' => 2,
155
  'active' => $GS->is_active('floating_bar_big_counter'),
156
  'only_activate' => false,
157
- 'href' => $GS->gs_account().'/sites/gs-wordpress/big_counter_floating_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('floating-bar-big-counter'),
158
  'desc' => "Increase engagement by showing the total number of shares in a big counter on top of your floating share bar."
159
  ),
160
  'Custom Sharing Actions' => array(
@@ -165,7 +165,7 @@
165
  'plan' => 1,
166
  'active' => $GS->is_active('custom_actions'),
167
  'only_activate' => false,
168
- 'href' => $GS->gs_account().'/sites/gs-wordpress/elements/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('custom-actions'),
169
  'desc' => "Sometimes we need to say more than a simple 'Like'. Here you'll find more than 50 custom stories such as Awesome, Wish or Love."
170
  ),
171
  'Price Alert' => array(
@@ -176,7 +176,7 @@
176
  'plan' => 2,
177
  'active' => $GS->is_active('price_alert'),
178
  'only_activate' => false,
179
- 'href' => $GS->gs_account().'/sites/gs-wordpress/price_alerts/new?api_key='.$GS->api_key.'&amp;source=wordpress'.$GS->utms('price-alert'),
180
  'desc' => "Allow your visitors to get notified when a price drop occurs on a product they want to purchase. Increase sales and fight cart abandonment."
181
  ),
182
  'Google Analytics' => array(
@@ -187,7 +187,7 @@
187
  'plan' => 2,
188
  'active' => $GS->is_active('ga_integration'),
189
  'only_activate' => true,
190
- 'href' => $GS->api_url('sites/activate/'.get_option('gs-api-key').'/ga_integration'),
191
  'desc' => "Integrate your GetSocial sharing activity with Google Analytics and have all of your analytics in one place. No code required"
192
  ),
193
  'MailChimp' => array(
@@ -208,11 +208,12 @@
208
  $plan_categories = array_values($categories);
209
  $plan_categories_name = array_keys($categories);
210
 
211
- function plan_class($plan_id){
212
  global $plan_class;
213
  return $plan_class[$plan_id - 1];
214
  }
215
- function plan_name($plan_id){
 
216
  global $plan_name;
217
  return $plan_name[$plan_id - 1];
218
  }
22
  'plan' => 1,
23
  'active' => $GS->is_active('sharing_bar'),
24
  'only_activate' => false,
25
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/groups/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('sharing-bar'),
26
  'desc' => "Use one of our templates or design your own social sharing bar. Customize size, shape & colour and pick from 15 social networks."
27
  ),
28
  'Mobile Sharing Bar' => array(
33
  'plan' => 2,
34
  'active' => $GS->is_active('mobile_bar'),
35
  'only_activate' => false,
36
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/mobile_bar/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('mobile-bar'),
37
  "desc" => "Mobile Web is one of the fastest growing platform both in traffic and shares. Don't miss out on the opportunity to boost your traffic with our slick mobile web sharing interface. No code needed."
38
  ),
39
  'Floating Sharing Bar' => array(
44
  'plan' => 1,
45
  'active' => $GS->is_active('floating_bar'),
46
  'only_activate' => false,
47
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/floating_bar/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('floating-bar'),
48
  "desc" => "Use one of our templates or design your own floating sharing bar. Customize size, shape & placement and pick from 15 social networks."
49
  ),
50
  'Image Sharing' => array(
55
  'plan' => 2,
56
  'active' => $GS->is_active('image_sharing'),
57
  'only_activate' => false,
58
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/image_sharing/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('image-sharing'),
59
  "desc" => "Increase shares on images on your website. Great for media-based websites."
60
  ),
61
  'Copy Paste Share Tracking' => array(
66
  'plan' => 2,
67
  'active' => $GS->is_active('address_tracking'),
68
  'only_activate' => true,
69
+ 'href' => $GS->api_url('sites/activate/' . get_option('gs-api-key') . '/address-tracker'),
70
  "desc" => "Don't lose track of shares made through copying and pasting an URL on the address bar to social networks, email or other platforms."
71
  ),
72
  'Native Sharing Bar' => array(
77
  'plan' => 1,
78
  'active' => $GS->is_active('native_bar'),
79
  'only_activate' => false,
80
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/native_bar/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('native-bar'),
81
  'desc' => "It doesn't get much more classic than this. Your native sharing buttons with tracking abilities. Great for those who want to keep it real."
82
  ),
83
  'Horizontal Follow Bar' => array(
88
  'plan' => 1,
89
  'active' => $GS->is_active('follow_bar'),
90
  'only_activate' => false,
91
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/follow_bar/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('follow-bar'),
92
  'desc' => "Grow your follower base in Facebook, Twitter, Pinterest and more with these beautiful free follow buttons."
93
  ),
94
  'Floating Follow Bar' => array(
99
  'plan' => 1,
100
  'active' => $GS->is_active('floating_follow_bar'),
101
  'only_activate' => false,
102
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/follow_floating_bar/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('floating-follow-bar'),
103
  'desc' => "Grow your follower base in Facebook, Twitter, Pinterest and more with these beautiful free follow buttons."
104
  ),
105
  'Mobile Follow Bar' => array(
110
  'plan' => 2,
111
  'active' => $GS->is_active('mobile_follow_bar'),
112
  'only_activate' => false,
113
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/follow_mobile_bar/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('mobile-follow-bar'),
114
  'desc' => "Don't miss out on the opportunity to convert mobile visitors into brand followers with our mobile follow buttons."
115
  ),
116
  'Welcome Bar' => array(
121
  'plan' => 1,
122
  'active' => $GS->is_active('welcome_bar'),
123
  'only_activate' => false,
124
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/welcome_bars/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('welcome-bar'),
125
  "desc" => "Easily lead your visitors to a specific link. Great to generate conversions, engage with promotions and increase traffic. No code needed."
126
  ),
127
  'Subscriber Bar' => array(
132
  'plan' => 2,
133
  'active' => $GS->is_active('subscriber_bar'),
134
  'only_activate' => false,
135
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/subscribe_bars/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('subscriber-bar'),
136
  "desc" => "Easily capture emails from your visitors by providing them with an engaging top bar. Export data to your favorite CRM or e-Mail marketing software."
137
  ),
138
  'Big Total Shares Horizontal' => array(
143
  'plan' => 2,
144
  'active' => $GS->is_active('social_bar_big_counter'),
145
  'only_activate' => false,
146
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/big_counter_sharing_bar/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('social-bar-big-counter'),
147
  'desc' => "Increase engagement by showing the total number of shares in a big counter on the left of your horizontal share bar."
148
  ),
149
  'Big Total Shares Floating' => array(
154
  'plan' => 2,
155
  'active' => $GS->is_active('floating_bar_big_counter'),
156
  'only_activate' => false,
157
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/big_counter_floating_bar/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('floating-bar-big-counter'),
158
  'desc' => "Increase engagement by showing the total number of shares in a big counter on top of your floating share bar."
159
  ),
160
  'Custom Sharing Actions' => array(
165
  'plan' => 1,
166
  'active' => $GS->is_active('custom_actions'),
167
  'only_activate' => false,
168
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/elements/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('custom-actions'),
169
  'desc' => "Sometimes we need to say more than a simple 'Like'. Here you'll find more than 50 custom stories such as Awesome, Wish or Love."
170
  ),
171
  'Price Alert' => array(
176
  'plan' => 2,
177
  'active' => $GS->is_active('price_alert'),
178
  'only_activate' => false,
179
+ 'href' => $GS->gs_account() . '/sites/gs-wordpress/price_alerts/new?api_key=' . $GS->api_key . '&amp;source=wordpress' . $GS->utms('price-alert'),
180
  'desc' => "Allow your visitors to get notified when a price drop occurs on a product they want to purchase. Increase sales and fight cart abandonment."
181
  ),
182
  'Google Analytics' => array(
187
  'plan' => 2,
188
  'active' => $GS->is_active('ga_integration'),
189
  'only_activate' => true,
190
+ 'href' => $GS->api_url('sites/activate/' . get_option('gs-api-key') . '/ga_integration'),
191
  'desc' => "Integrate your GetSocial sharing activity with Google Analytics and have all of your analytics in one place. No code required"
192
  ),
193
  'MailChimp' => array(
208
  $plan_categories = array_values($categories);
209
  $plan_categories_name = array_keys($categories);
210
 
211
+ function plan_class($plan_id) {
212
  global $plan_class;
213
  return $plan_class[$plan_id - 1];
214
  }
215
+
216
+ function plan_name($plan_id) {
217
  global $plan_name;
218
  return $plan_name[$plan_id - 1];
219
  }
tmpl/apps_filters.php CHANGED
@@ -2,7 +2,7 @@
2
  <div class="app-grid-filter-holder">
3
  <a href="javascript:void(0)" id="clear-filter" class="gs-button gs-error trans" style="display: none"><i class="fa fa-times-circle"></i> Clear filter</a>
4
 
5
- <?php if($plan_current == 'one'): ?>
6
  <a href="javascript:void(0)" class="gs-button plan-two trans gs-tooltip" data-filter="two">Starter Apps <div>Apps that are only available in the <strong>Starter Plan</strong></div></a>
7
  <?php endif; ?>
8
 
2
  <div class="app-grid-filter-holder">
3
  <a href="javascript:void(0)" id="clear-filter" class="gs-button gs-error trans" style="display: none"><i class="fa fa-times-circle"></i> Clear filter</a>
4
 
5
+ <?php if ($plan_current == 'one'): ?>
6
  <a href="javascript:void(0)" class="gs-button plan-two trans gs-tooltip" data-filter="two">Starter Apps <div>Apps that are only available in the <strong>Starter Plan</strong></div></a>
7
  <?php endif; ?>
8
 
tmpl/header.php CHANGED
@@ -1,24 +1,21 @@
1
  <?php
2
- if ( !current_user_can( 'manage_options' ) ) {
3
- wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
4
  }
5
 
6
- // $GETSOCIAL_URL = 'http://getsocial.io';
7
- // $GETSOCIAL_URL = 'http://localhost:3000';
8
-
9
  $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
10
 
11
- $GS = new GS( get_option('gs-api-key'),
12
- get_option('gs-identifier'),
13
- get_option('gs-lang'));
14
 
15
  $site_info = $GS->refreshSite();
16
 
17
- wp_register_style( 'getsocial-style', plugins_url('../css/getsocial-style.css?v=2.7', __FILE__) );
18
- wp_enqueue_style( 'getsocial-style' );
19
 
20
- wp_register_script( 'plugin', plugins_url('../js/plugin.js', __FILE__) );
21
- wp_enqueue_script( 'plugin' );
22
 
23
  ?>
24
 
@@ -39,26 +36,23 @@ wp_enqueue_script( 'plugin' );
39
  </a>
40
  <nav>
41
  <ul>
42
- <?php if(get_option('gs-api-key') != ''): ?>
43
  <li class="submenu-link">
44
  <a href="<?php echo $GS->gs_account().'/sites/gs-wordpress/analytics/dashboard?api_key='.$GS->api_key.'&amp;source=wordpress' ?>" target="_blank">
45
  <i class="fa fa-bar-chart"></i> Social Analytics</i>
46
  </a>
47
  </li>
48
-
49
  <li class="submenu-link">
50
  <a id="settings" href="javascript:void(0)">
51
  <i class="fa fa-cogs"></i> Settings
52
  </a>
53
  </li>
54
-
55
  <li class="submenu-link">
56
  <a href="<?php echo $GS->gs_account().'/sites/gs-wordpress/exclusions?api_key='.$GS->api_key.'&amp;source=wordpress' ?>" target="_blank">
57
  <i class="fa fa-chain-broken"></i> Exclude Pages
58
  </a>
59
  </li>
60
  <?php endif; ?>
61
-
62
  <li class="submenu-link">
63
  <a href="javascript:void(0)">
64
  <i class="fa fa-question-circle"></i> Help & Support <i class="fa fa-angle-down"></i>
@@ -78,15 +72,13 @@ wp_enqueue_script( 'plugin' );
78
  </ul>
79
  </div>
80
  </li>
81
-
82
- <?php if(get_option('gs-api-key') != '' && !$GS->is_pro()): ?>
83
  <li id="cta-nav" class="right-link">
84
  <a href="<?php echo $GS->gs_account() ?>/sites/gs-wordpress/billing/select_tier?api_key=<?php echo $GS->api_key ?>&amp;source=wordpress<?php echo $GS->utms('pro_header') ?>" target="_blank" class="plan-two">
85
  Upgrade to STARTER
86
  </a>
87
  </li>
88
-
89
- <?php if(get_option('gs-ask-review')): ?>
90
  <li class="right-link">
91
  <a href="https://wordpress.org/support/view/plugin-reviews/wp-share-buttons-analytics-by-getsocial" target="_blank">
92
  Support us with a 5 <i class="fa fa-star"></i> Review!
@@ -97,13 +89,12 @@ wp_enqueue_script( 'plugin' );
97
  </ul>
98
  </div>
99
  </nav>
100
-
101
  <div class="title-wrapper <?php echo get_option('gs-api-key') == '' ? '' : 'app-page' ?>">
102
- <?php if(get_option('gs-api-key') == ''): ?>
103
  <h1>Welcome and thanks for downloading <span>GetSocial’s Share Buttons & Social Media App Store</span></h1>
104
  <p>To get started click on the button below to automatically activate your GetSocial account.</strong></p>
105
  <?php else: ?>
106
  <h1 id="app-title" class="app-grid-titles"><span>Install your apps below</span></h1>
107
  <?php endif; ?>
108
  </div>
109
- </header>
1
  <?php
2
+ if (!current_user_can('manage_options')) {
3
+ wp_die(__('You do not have sufficient permissions to access this page.'));
4
  }
5
 
 
 
 
6
  $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
7
 
8
+ $GS = new GS(get_option('gs-api-key'),
9
+ get_option('gs-identifier'),
10
+ get_option('gs-lang'));
11
 
12
  $site_info = $GS->refreshSite();
13
 
14
+ wp_register_style('getsocial-style', plugins_url('../css/getsocial-style.css?v=2.7', __FILE__));
15
+ wp_enqueue_style('getsocial-style');
16
 
17
+ wp_register_script('plugin', plugins_url('../js/plugin.js', __FILE__));
18
+ wp_enqueue_script('plugin');
19
 
20
  ?>
21
 
36
  </a>
37
  <nav>
38
  <ul>
39
+ <?php if (get_option('gs-api-key') != ''): ?>
40
  <li class="submenu-link">
41
  <a href="<?php echo $GS->gs_account().'/sites/gs-wordpress/analytics/dashboard?api_key='.$GS->api_key.'&amp;source=wordpress' ?>" target="_blank">
42
  <i class="fa fa-bar-chart"></i> Social Analytics</i>
43
  </a>
44
  </li>
 
45
  <li class="submenu-link">
46
  <a id="settings" href="javascript:void(0)">
47
  <i class="fa fa-cogs"></i> Settings
48
  </a>
49
  </li>
 
50
  <li class="submenu-link">
51
  <a href="<?php echo $GS->gs_account().'/sites/gs-wordpress/exclusions?api_key='.$GS->api_key.'&amp;source=wordpress' ?>" target="_blank">
52
  <i class="fa fa-chain-broken"></i> Exclude Pages
53
  </a>
54
  </li>
55
  <?php endif; ?>
 
56
  <li class="submenu-link">
57
  <a href="javascript:void(0)">
58
  <i class="fa fa-question-circle"></i> Help & Support <i class="fa fa-angle-down"></i>
72
  </ul>
73
  </div>
74
  </li>
75
+ <?php if (get_option('gs-api-key') != '' && !$GS->is_pro()): ?>
 
76
  <li id="cta-nav" class="right-link">
77
  <a href="<?php echo $GS->gs_account() ?>/sites/gs-wordpress/billing/select_tier?api_key=<?php echo $GS->api_key ?>&amp;source=wordpress<?php echo $GS->utms('pro_header') ?>" target="_blank" class="plan-two">
78
  Upgrade to STARTER
79
  </a>
80
  </li>
81
+ <?php if (get_option('gs-ask-review')): ?>
 
82
  <li class="right-link">
83
  <a href="https://wordpress.org/support/view/plugin-reviews/wp-share-buttons-analytics-by-getsocial" target="_blank">
84
  Support us with a 5 <i class="fa fa-star"></i> Review!
89
  </ul>
90
  </div>
91
  </nav>
 
92
  <div class="title-wrapper <?php echo get_option('gs-api-key') == '' ? '' : 'app-page' ?>">
93
+ <?php if (get_option('gs-api-key') == ''): ?>
94
  <h1>Welcome and thanks for downloading <span>GetSocial’s Share Buttons & Social Media App Store</span></h1>
95
  <p>To get started click on the button below to automatically activate your GetSocial account.</strong></p>
96
  <?php else: ?>
97
  <h1 id="app-title" class="app-grid-titles"><span>Install your apps below</span></h1>
98
  <?php endif; ?>
99
  </div>
100
+ </header>
uninstall.php CHANGED
@@ -5,11 +5,11 @@
5
  */
6
 
7
  //if uninstall not called from WordPress exit
8
- if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
9
  exit();
10
  }
11
 
12
- if ( defined( 'WP_UNINSTALL_PLUGIN' ) ) {
13
 
14
  // delete any options or other data stored in the database here
15
  delete_site_option('gs-identifier');
@@ -21,7 +21,4 @@ if ( defined( 'WP_UNINSTALL_PLUGIN' ) ) {
21
  delete_site_option('gs-api-key');
22
  delete_site_option('gs-apps');
23
  delete_site_option('gs-lang');
24
- // delete_site_option('gs-place');
25
- // delete_site_option('gs-place-follow');
26
- // delete_site_option('gs-posts-page');
27
  }
5
  */
6
 
7
  //if uninstall not called from WordPress exit
8
+ if (!defined( 'WP_UNINSTALL_PLUGIN')) {
9
  exit();
10
  }
11
 
12
+ if (defined('WP_UNINSTALL_PLUGIN')) {
13
 
14
  // delete any options or other data stored in the database here
15
  delete_site_option('gs-identifier');
21
  delete_site_option('gs-api-key');
22
  delete_site_option('gs-apps');
23
  delete_site_option('gs-lang');
 
 
 
24
  }
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: 2.9.1
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: GPL2
@@ -13,9 +13,9 @@ include('lib/gs.php');
13
 
14
  /* MENU */
15
 
16
- add_action( 'admin_menu', 'gs_getsocial_menu' );
17
 
18
- function gs_getsocial_menu(){
19
  $GS = get_gs();
20
 
21
  add_menu_page( 'GetSocial', 'GetSocial', 'manage_options', slug_path('init.php'), '', 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgMjAiPjxwYXRoIGZpbGw9IiMzMzlFRDUiIGQ9Ik0xOCAwaC0xNmMtMS4xIDAtMiAuOS0yIDJ2MTZjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMnYtMTZjMC0xLjEtLjktMi0yLTJ6bS0xMS45IDE0LjZjLTIgMC00LjEtMS4yLTQuMS0zLjkgMC0xLjMuNi0yLjcgMS42LTMuN3MyLjMtMS42IDMuOS0xLjZjMS44IDAgMi45LjcgMy42IDEuNWwtMS41IDEuM2MtLjUtLjYtMS4yLTEtMi4zLTEtLjkgMC0xLjcuNC0yLjMgMS0uNi42LTEgMS41LTEgMi41IDAgMS40IDEgMi4xIDIuMiAyLjEuNyAwIDEuMi0uMiAxLjYtLjNsLjQtMS41aC0xLjlsLjQtMS43aDMuOGwtMS4yIDQuNGMtLjkuNi0xLjkuOS0zLjIuOXptOC45LTUuMmMxLjIuNSAyIDEuMSAyIDIuMyAwIC43LS4zIDEuNC0uNyAxLjktLjYuNi0xLjUgMS0yLjUgMS0xLjYgMC0yLjgtLjUtMy42LTEuNWwxLjMtMS4xYy43LjggMS41IDEuMSAyLjQgMS4xLjggMCAxLjQtLjQgMS40LTEuMSAwLS41LS4zLS44LTEuNS0xLjMtMS4xLS41LTItMS0yLTIuMyAwLS43LjMtMS40LjctMS45LjYtLjYgMS41LTEgMi42LTEgMS4zIDAgMi4zLjQgMyAxLjJsLTEuMyAxLjNjLS42LS42LTEuMi0uOS0yLS45LS45IDAtMS40LjUtMS40IDEgMCAuNi41LjggMS42IDEuM3oiLz48L3N2Zz4=' );
@@ -24,11 +24,12 @@ function gs_getsocial_menu(){
24
 
25
  function slug_path($s) {
26
  $main_slug = 'wp-share-buttons-analytics-by-getsocial/';
 
27
  return ($main_slug.$s);
28
  }
29
 
30
- add_action( 'wp_ajax_gs_update', 'update_getsocial' );
31
- add_action( 'wp_ajax_gs_update_with_values', 'update_getsocial_with_values' );
32
 
33
  function update_getsocial() {
34
  global $wpdb; // this is how you get access to the database
@@ -49,46 +50,46 @@ function update_getsocial_with_values() {
49
  wp_die(); // this is required to terminate immediately and return a proper response
50
  }
51
 
52
-
53
- function register_gs_settings(){
54
- register_setting( 'getsocial-gs-settings' , 'gs-api-key' );
55
- register_setting( 'getsocial-gs-settings' , 'gs-place' );
56
- register_setting( 'getsocial-gs-settings' , 'gs-place-follow' );
57
- // register_setting( 'getsocial-gs-settings' , 'gs-buttons-position' );
58
- register_setting( 'getsocial-gs-settings' , 'gs-lang' );
59
- register_setting( 'getsocial-gs-settings' , 'gs-posts-page' );
60
 
61
  foreach(array('group', 'floating') as $app):
62
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-active' );
63
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-network-fb' );
64
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-network-tw' );
65
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-network-pn' );
66
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-network-gp' );
67
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-template' );
68
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-size' );
69
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-counter' );
70
- register_setting( 'getsocial-gs-'.$app , 'gs-'.$app.'-position' );
71
  endforeach;
72
 
73
-
74
- register_setting( 'getsocial-gs-custom-expressions' , 'gs-custom-expression-active' );
75
- register_setting( 'getsocial-gs-custom-expressions' , 'gs-custom-expression-position' );
76
  }
77
 
78
- function get_gs(){
79
  return new GS(get_option('gs-api-key'),
80
  get_option('gs-identifier'),
81
  get_option('gs-lang'));
82
  }
83
 
84
- add_action('wp_head','add_gs_lib');
 
 
 
85
 
86
- function add_gs_lib(){
87
  $GS = get_gs();
88
  echo $GS->getLib();
89
  }
90
 
91
- if ( class_exists( 'WooCommerce' ) ) {
92
  add_action( 'woocommerce_single_product_summary', 'on_product_after_content', 55 );
93
  }
94
 
@@ -107,7 +108,6 @@ add_action('woocommerce_before_main_content', 'on_post_content', 10);
107
 
108
  // Add GS code to the post excerpts
109
  function change_excerpt($content) {
110
-
111
  global $wp_query;
112
  $post = $wp_query->post;
113
  $GS = get_gs();
@@ -116,12 +116,9 @@ function change_excerpt($content) {
116
  $big_counter_bar_active = $GS->is_active('social_bar_big_counter');
117
  $after_content = "";
118
 
119
-
120
  // If we are in the posts page, show a share bar at the end of the post only
121
  if (is_home() && get_option('gs-posts-page') == 'active'):
122
-
123
  if($groups_active):
124
-
125
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
126
 
127
  $position = $GS->prop('sharing_bar', 'position');
@@ -129,11 +126,9 @@ function change_excerpt($content) {
129
  if($position == 'top' || $position == 'bottom' || $position == 'both'):
130
  $after_content = $after_content . $groups;
131
  endif;
132
-
133
  endif;
134
 
135
  if ($big_counter_bar_active):
136
-
137
  $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);
138
 
139
  $position = $GS->prop('sharing_bar', 'position');
@@ -141,7 +136,6 @@ function change_excerpt($content) {
141
  if( $position == 'top' || $position == 'bottom' || $position == 'both'):
142
  $after_content = $after_content . $big_counter;
143
  endif;
144
-
145
  endif;
146
  endif;
147
 
@@ -150,35 +144,32 @@ function change_excerpt($content) {
150
  return $content;
151
  }
152
 
153
-
154
  function on_product_after_content($content) {
155
  echo add_buttons_to_content($content, true, 'bottom');
156
  }
157
 
158
-
159
  function on_post_content($content) {
160
  return add_buttons_to_content($content, false);
161
  }
162
 
163
- function add_buttons_to_content($content, $woocomerce, $wooposition = null){
164
  global $post;
165
- // $meta_values = get_post_meta( $post->post_id, '_my_meta_getsocialio_hide', true );
166
-
167
  $getsocial_meta = get_post_custom();
168
 
169
- if(isset($getsocial_meta['_my_meta_getsocialio_hide'])){
170
  $hide_bars = $getsocial_meta['_my_meta_getsocialio_hide'][0];
171
 
172
- if($hide_bars == 1){
173
  return $content;
174
  }
175
  }
176
 
177
- if(is_singular('page') && $post->post_type != 'page'){
178
  return $content;
179
  }
180
 
181
- if(!$woocomerce && $post->post_type == 'product'){
182
  return $content;
183
  }
184
 
@@ -186,7 +177,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null){
186
 
187
  $condition = true;
188
 
189
- if($places == null || $places == 'place-all'):
190
 
191
  if (function_exists('is_shop')) {
192
  $shop_page = is_shop();
@@ -217,7 +208,6 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null){
217
  $condition_follow = false;
218
  endif;
219
 
220
- // if ( $condition ):
221
  $GS = get_gs();
222
 
223
  $groups_active = $GS->is_active('sharing_bar');
@@ -226,21 +216,14 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null){
226
  $price_alert_active = $GS->is_active('price_alert');
227
  $big_counter_bar_active = $GS->is_active('social_bar_big_counter');
228
  $follow_bar_active = $GS->is_active('follow_bar');
229
- //
230
  $before_content = "";
231
  $after_content = "";
232
 
233
  $custom_content = $content;
234
 
235
- // Check if is the blog posts page and user wants the bars here t
236
- // if ( 'posts' == get_option('show_on_front') && is_home() ) :
237
- // return $content . '<div class="getsocial gs-inline-group"></div>';
238
- // endif;
239
-
240
- if(!is_feed() && !is_home()):
241
- // if(!is_home()):
242
 
243
- if($groups_active && $condition):
244
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
245
 
246
  $position = ($wooposition != null ? $wooposition : $GS->prop('sharing_bar', 'position'));
@@ -254,7 +237,7 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null){
254
  endif;
255
  endif;
256
 
257
- if($price_alert_active && $wooposition && $condition):
258
 
259
  $product = new WC_Product( get_the_ID() );
260
 
@@ -267,12 +250,12 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null){
267
  $after_content = $price_alert_button;
268
  endif;
269
 
270
- if($custom_active && $condition):
271
  $custom = $GS->getCode('custom_actions', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
272
 
273
  $position = ($wooposition != null ? $wooposition : $GS->prop('custom_actions', 'position'));
274
 
275
- if($position == 'bottom' || $position == 'both'):
276
  $after_content = $after_content.$custom;
277
  endif;
278
 
@@ -281,58 +264,56 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null){
281
  endif;
282
  endif;
283
 
284
- if($big_counter_bar_active && $condition):
285
  $big_counter = $GS->getCode('social_bar_big_counter', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
286
 
287
  $position = ($wooposition != null ? $wooposition : $GS->prop('social_bar_big_counter', 'position'));
288
 
289
- if($position == 'bottom' || $position == 'both'):
290
  $after_content = $after_content.$big_counter;
291
  endif;
292
 
293
- if ( $position == 'top' || $position == 'both' ):
294
  $before_content = $before_content.$big_counter.'<br/>';
295
  endif;
296
  endif;
297
 
298
- if($follow_bar_active && $condition_follow):
299
  $follow_bar = $GS->getCode('follow_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
300
 
301
  $position = ($wooposition != null ? $wooposition : $GS->prop('follow_bar', 'position'));
302
 
303
- if($position == 'bottom' || $position == 'both'):
304
  $after_content = $after_content.$follow_bar;
305
  endif;
306
 
307
- if ( $position == 'top' || $position == 'both' ):
308
  $before_content = $before_content.$follow_bar.'<br/>';
309
  endif;
310
  endif;
311
 
312
- if($native_active && $condition):
313
  $native = $GS->getCode('native_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
314
 
315
  $position = ($wooposition != null ? $wooposition : $GS->prop('native_bar', 'position'));
316
 
317
- if($position == 'bottom' || $position == 'both'):
318
  $after_content = $after_content.$native;
319
  endif;
320
 
321
- if ( $position == 'top' || $position == 'both' ):
322
  $before_content = $before_content.$native.'<br/>';
323
  endif;
324
  endif;
325
  endif;
326
  // if is the posts page, add follow bars at the end of the post
327
  if (is_home() && get_option('gs-posts-page') == 'active'):
328
-
329
- if($groups_active):
330
-
331
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
332
 
333
  $position = ($wooposition != null ? $wooposition : $GS->prop('sharing_bar', 'position'));
334
 
335
- if( $position == 'top' || $position == 'bottom' || $position == 'both'):
336
  $after_content = $after_content . $groups;
337
  endif;
338
  endif;
@@ -351,12 +332,9 @@ function add_buttons_to_content($content, $woocomerce, $wooposition = null){
351
  $custom_content = $before_content . $custom_content . $after_content;
352
 
353
  return $custom_content;
354
- // else:
355
- // return $content;
356
- // endif;
357
  }
358
 
359
- add_shortcode( 'getsocial', 'gs_bars_shortcode' );
360
 
361
  function gs_bars_shortcode($atts) {
362
 
@@ -371,7 +349,7 @@ function gs_bars_shortcode($atts) {
371
  }
372
 
373
  // if no type defined
374
- if($atts['app'] == 'follow_bar' || (array_key_exists('app',$atts) && (is_single() || is_page() || $shop_page))){
375
  return $GS->getCode($atts['app'], get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
376
  } else {
377
  return "";
@@ -396,14 +374,15 @@ function getsocialio_add_meta_box_settings() {
396
  );
397
  }
398
  }
399
- add_action( 'add_meta_boxes', 'getsocialio_add_meta_box_settings' );
 
400
 
401
  /**
402
  * Prints the box content.
403
  *
404
  * @param WP_Post $post The object for the current post/page.
405
  */
406
- function getsocialio_meta_box_callback( $post ) {
407
 
408
  // Add an nonce field so we can check for it later.
409
  wp_nonce_field( 'getsocialio_meta_box', 'getsocialio_meta_box_nonce' );
@@ -420,7 +399,6 @@ function getsocialio_meta_box_callback( $post ) {
420
  _e( ' Hide social bars?', 'getsocialio_textdomain' );
421
  echo '</label>';
422
  echo '<br/><br/><p class="howto"><i>Limited to Horizontal Bars</i></p>';
423
-
424
  }
425
 
426
  /**
@@ -428,7 +406,7 @@ function getsocialio_meta_box_callback( $post ) {
428
  *
429
  * @param int $post_id The ID of the post being saved.
430
  */
431
- function getsocialio_save_meta_box_data( $post_id ) {
432
 
433
  /*
434
  * We need to verify this came from our screen and with proper authorization,
@@ -436,27 +414,27 @@ function getsocialio_save_meta_box_data( $post_id ) {
436
  */
437
 
438
  // Check if our nonce is set.
439
- if ( ! isset( $_POST['getsocialio_meta_box_nonce'] ) ) {
440
  return;
441
  }
442
 
443
  // Verify that the nonce is valid.
444
- if ( ! wp_verify_nonce( $_POST['getsocialio_meta_box_nonce'], 'getsocialio_meta_box' ) ) {
445
  return;
446
  }
447
 
448
  // If this is an autosave, our form has not been submitted, so we don't want to do anything.
449
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
450
  return;
451
  }
452
 
453
  // Check the user's permissions.
454
- if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {
455
- if ( ! current_user_can( 'edit_page', $post_id ) ) {
456
  return;
457
  }
458
  } else {
459
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
460
  return;
461
  }
462
  }
@@ -464,11 +442,11 @@ function getsocialio_save_meta_box_data( $post_id ) {
464
  /* OK, it's safe for us to save the data now. */
465
 
466
  // Make sure that it is set.
467
- if ( ! isset( $_POST['getsocialio_hide'] ) ) {
468
  $my_data = 0;
469
  } else {
470
  // Sanitize user input.
471
- $my_data = sanitize_text_field( $_POST['getsocialio_hide'] );
472
  }
473
 
474
  // Update the meta field in the database.
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: 2.9.2
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: GPL2
13
 
14
  /* MENU */
15
 
16
+ add_action('admin_menu', 'gs_getsocial_menu');
17
 
18
+ function gs_getsocial_menu() {
19
  $GS = get_gs();
20
 
21
  add_menu_page( 'GetSocial', 'GetSocial', 'manage_options', slug_path('init.php'), '', 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgMjAiPjxwYXRoIGZpbGw9IiMzMzlFRDUiIGQ9Ik0xOCAwaC0xNmMtMS4xIDAtMiAuOS0yIDJ2MTZjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMnYtMTZjMC0xLjEtLjktMi0yLTJ6bS0xMS45IDE0LjZjLTIgMC00LjEtMS4yLTQuMS0zLjkgMC0xLjMuNi0yLjcgMS42LTMuN3MyLjMtMS42IDMuOS0xLjZjMS44IDAgMi45LjcgMy42IDEuNWwtMS41IDEuM2MtLjUtLjYtMS4yLTEtMi4zLTEtLjkgMC0xLjcuNC0yLjMgMS0uNi42LTEgMS41LTEgMi41IDAgMS40IDEgMi4xIDIuMiAyLjEuNyAwIDEuMi0uMiAxLjYtLjNsLjQtMS41aC0xLjlsLjQtMS43aDMuOGwtMS4yIDQuNGMtLjkuNi0xLjkuOS0zLjIuOXptOC45LTUuMmMxLjIuNSAyIDEuMSAyIDIuMyAwIC43LS4zIDEuNC0uNyAxLjktLjYuNi0xLjUgMS0yLjUgMS0xLjYgMC0yLjgtLjUtMy42LTEuNWwxLjMtMS4xYy43LjggMS41IDEuMSAyLjQgMS4xLjggMCAxLjQtLjQgMS40LTEuMSAwLS41LS4zLS44LTEuNS0xLjMtMS4xLS41LTItMS0yLTIuMyAwLS43LjMtMS40LjctMS45LjYtLjYgMS41LTEgMi42LTEgMS4zIDAgMi4zLjQgMyAxLjJsLTEuMyAxLjNjLS42LS42LTEuMi0uOS0yLS45LS45IDAtMS40LjUtMS40IDEgMCAuNi41LjggMS42IDEuM3oiLz48L3N2Zz4=' );
24
 
25
  function slug_path($s) {
26
  $main_slug = 'wp-share-buttons-analytics-by-getsocial/';
27
+
28
  return ($main_slug.$s);
29
  }
30
 
31
+ add_action('wp_ajax_gs_update', 'update_getsocial');
32
+ add_action('wp_ajax_gs_update_with_values', 'update_getsocial_with_values');
33
 
34
  function update_getsocial() {
35
  global $wpdb; // this is how you get access to the database
50
  wp_die(); // this is required to terminate immediately and return a proper response
51
  }
52
 
53
+ function register_gs_settings() {
54
+ register_setting('getsocial-gs-settings' , 'gs-api-key');
55
+ register_setting('getsocial-gs-settings' , 'gs-place');
56
+ register_setting('getsocial-gs-settings' , 'gs-place-follow');
57
+ register_setting('getsocial-gs-settings' , 'gs-lang');
58
+ register_setting('getsocial-gs-settings' , 'gs-posts-page');
 
 
59
 
60
  foreach(array('group', 'floating') as $app):
61
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-active');
62
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-network-fb');
63
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-network-tw');
64
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-network-pn');
65
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-network-gp');
66
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-template');
67
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-size');
68
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-counter');
69
+ register_setting('getsocial-gs-' . $app, 'gs-' . $app . '-position');
70
  endforeach;
71
 
72
+ register_setting('getsocial-gs-custom-expressions', 'gs-custom-expression-active');
73
+ register_setting('getsocial-gs-custom-expressions', 'gs-custom-expression-position');
 
74
  }
75
 
76
+ function get_gs() {
77
  return new GS(get_option('gs-api-key'),
78
  get_option('gs-identifier'),
79
  get_option('gs-lang'));
80
  }
81
 
82
+ // Add GS lib only if the plugin is activated and registered
83
+ if (get_option('gs-api-key') != '') {
84
+ add_action('wp_head','add_gs_lib');
85
+ }
86
 
87
+ function add_gs_lib() {
88
  $GS = get_gs();
89
  echo $GS->getLib();
90
  }
91
 
92
+ if (class_exists('WooCommerce')) {
93
  add_action( 'woocommerce_single_product_summary', 'on_product_after_content', 55 );
94
  }
95
 
108
 
109
  // Add GS code to the post excerpts
110
  function change_excerpt($content) {
 
111
  global $wp_query;
112
  $post = $wp_query->post;
113
  $GS = get_gs();
116
  $big_counter_bar_active = $GS->is_active('social_bar_big_counter');
117
  $after_content = "";
118
 
 
119
  // If we are in the posts page, show a share bar at the end of the post only
120
  if (is_home() && get_option('gs-posts-page') == 'active'):
 
121
  if($groups_active):
 
122
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
123
 
124
  $position = $GS->prop('sharing_bar', 'position');
126
  if($position == 'top' || $position == 'bottom' || $position == 'both'):
127
  $after_content = $after_content . $groups;
128
  endif;
 
129
  endif;
130
 
131
  if ($big_counter_bar_active):
 
132
  $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);
133
 
134
  $position = $GS->prop('sharing_bar', 'position');
136
  if( $position == 'top' || $position == 'bottom' || $position == 'both'):
137
  $after_content = $after_content . $big_counter;
138
  endif;
 
139
  endif;
140
  endif;
141
 
144
  return $content;
145
  }
146
 
 
147
  function on_product_after_content($content) {
148
  echo add_buttons_to_content($content, true, 'bottom');
149
  }
150
 
 
151
  function on_post_content($content) {
152
  return add_buttons_to_content($content, false);
153
  }
154
 
155
+ function add_buttons_to_content($content, $woocomerce, $wooposition = null) {
156
  global $post;
157
+
 
158
  $getsocial_meta = get_post_custom();
159
 
160
+ if (isset($getsocial_meta['_my_meta_getsocialio_hide'])) {
161
  $hide_bars = $getsocial_meta['_my_meta_getsocialio_hide'][0];
162
 
163
+ if ($hide_bars == 1) {
164
  return $content;
165
  }
166
  }
167
 
168
+ if (is_singular('page') && $post->post_type != 'page') {
169
  return $content;
170
  }
171
 
172
+ if (!$woocomerce && $post->post_type == 'product') {
173
  return $content;
174
  }
175
 
177
 
178
  $condition = true;
179
 
180
+ if ($places == null || $places == 'place-all'):
181
 
182
  if (function_exists('is_shop')) {
183
  $shop_page = is_shop();
208
  $condition_follow = false;
209
  endif;
210
 
 
211
  $GS = get_gs();
212
 
213
  $groups_active = $GS->is_active('sharing_bar');
216
  $price_alert_active = $GS->is_active('price_alert');
217
  $big_counter_bar_active = $GS->is_active('social_bar_big_counter');
218
  $follow_bar_active = $GS->is_active('follow_bar');
 
219
  $before_content = "";
220
  $after_content = "";
221
 
222
  $custom_content = $content;
223
 
224
+ if (!is_feed() && !is_home()):
 
 
 
 
 
 
225
 
226
+ if ($groups_active && $condition):
227
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
228
 
229
  $position = ($wooposition != null ? $wooposition : $GS->prop('sharing_bar', 'position'));
237
  endif;
238
  endif;
239
 
240
+ if ($price_alert_active && $wooposition && $condition):
241
 
242
  $product = new WC_Product( get_the_ID() );
243
 
250
  $after_content = $price_alert_button;
251
  endif;
252
 
253
+ if ($custom_active && $condition):
254
  $custom = $GS->getCode('custom_actions', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
255
 
256
  $position = ($wooposition != null ? $wooposition : $GS->prop('custom_actions', 'position'));
257
 
258
+ if ($position == 'bottom' || $position == 'both'):
259
  $after_content = $after_content.$custom;
260
  endif;
261
 
264
  endif;
265
  endif;
266
 
267
+ if ($big_counter_bar_active && $condition):
268
  $big_counter = $GS->getCode('social_bar_big_counter', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
269
 
270
  $position = ($wooposition != null ? $wooposition : $GS->prop('social_bar_big_counter', 'position'));
271
 
272
+ if ($position == 'bottom' || $position == 'both'):
273
  $after_content = $after_content.$big_counter;
274
  endif;
275
 
276
+ if ($position == 'top' || $position == 'both'):
277
  $before_content = $before_content.$big_counter.'<br/>';
278
  endif;
279
  endif;
280
 
281
+ if ($follow_bar_active && $condition_follow):
282
  $follow_bar = $GS->getCode('follow_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
283
 
284
  $position = ($wooposition != null ? $wooposition : $GS->prop('follow_bar', 'position'));
285
 
286
+ if ($position == 'bottom' || $position == 'both'):
287
  $after_content = $after_content.$follow_bar;
288
  endif;
289
 
290
+ if ($position == 'top' || $position == 'both'):
291
  $before_content = $before_content.$follow_bar.'<br/>';
292
  endif;
293
  endif;
294
 
295
+ if ($native_active && $condition):
296
  $native = $GS->getCode('native_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
297
 
298
  $position = ($wooposition != null ? $wooposition : $GS->prop('native_bar', 'position'));
299
 
300
+ if ($position == 'bottom' || $position == 'both'):
301
  $after_content = $after_content.$native;
302
  endif;
303
 
304
+ if ($position == 'top' || $position == 'both'):
305
  $before_content = $before_content.$native.'<br/>';
306
  endif;
307
  endif;
308
  endif;
309
  // if is the posts page, add follow bars at the end of the post
310
  if (is_home() && get_option('gs-posts-page') == 'active'):
311
+ if ($groups_active):
 
 
312
  $groups = $GS->getCode('sharing_bar', get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)), null, null, true);
313
 
314
  $position = ($wooposition != null ? $wooposition : $GS->prop('sharing_bar', 'position'));
315
 
316
+ if ($position == 'top' || $position == 'bottom' || $position == 'both'):
317
  $after_content = $after_content . $groups;
318
  endif;
319
  endif;
332
  $custom_content = $before_content . $custom_content . $after_content;
333
 
334
  return $custom_content;
 
 
 
335
  }
336
 
337
+ add_shortcode('getsocial', 'gs_bars_shortcode');
338
 
339
  function gs_bars_shortcode($atts) {
340
 
349
  }
350
 
351
  // if no type defined
352
+ if ($atts['app'] == 'follow_bar' || (array_key_exists('app',$atts) && (is_single() || is_page() || $shop_page))) {
353
  return $GS->getCode($atts['app'], get_permalink(), get_the_title(), wp_get_attachment_url( get_post_thumbnail_id($post->ID)));
354
  } else {
355
  return "";
374
  );
375
  }
376
  }
377
+
378
+ add_action('add_meta_boxes', 'getsocialio_add_meta_box_settings');
379
 
380
  /**
381
  * Prints the box content.
382
  *
383
  * @param WP_Post $post The object for the current post/page.
384
  */
385
+ function getsocialio_meta_box_callback($post) {
386
 
387
  // Add an nonce field so we can check for it later.
388
  wp_nonce_field( 'getsocialio_meta_box', 'getsocialio_meta_box_nonce' );
399
  _e( ' Hide social bars?', 'getsocialio_textdomain' );
400
  echo '</label>';
401
  echo '<br/><br/><p class="howto"><i>Limited to Horizontal Bars</i></p>';
 
402
  }
403
 
404
  /**
406
  *
407
  * @param int $post_id The ID of the post being saved.
408
  */
409
+ function getsocialio_save_meta_box_data($post_id) {
410
 
411
  /*
412
  * We need to verify this came from our screen and with proper authorization,
414
  */
415
 
416
  // Check if our nonce is set.
417
+ if (!isset($_POST['getsocialio_meta_box_nonce'])) {
418
  return;
419
  }
420
 
421
  // Verify that the nonce is valid.
422
+ if (!wp_verify_nonce($_POST['getsocialio_meta_box_nonce'], 'getsocialio_meta_box')) {
423
  return;
424
  }
425
 
426
  // If this is an autosave, our form has not been submitted, so we don't want to do anything.
427
+ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
428
  return;
429
  }
430
 
431
  // Check the user's permissions.
432
+ if (isset($_POST['post_type']) && 'page' == $_POST['post_type']) {
433
+ if (!current_user_can('edit_page', $post_id)) {
434
  return;
435
  }
436
  } else {
437
+ if (!current_user_can('edit_post', $post_id)) {
438
  return;
439
  }
440
  }
442
  /* OK, it's safe for us to save the data now. */
443
 
444
  // Make sure that it is set.
445
+ if (!isset($_POST['getsocialio_hide'])) {
446
  $my_data = 0;
447
  } else {
448
  // Sanitize user input.
449
+ $my_data = sanitize_text_field($_POST['getsocialio_hide']);
450
  }
451
 
452
  // Update the meta field in the database.