Social Media Share Buttons - Version 2.2

Version Description

= 2.1 = We have added the Big Total Sharing buttons and increased the range of social networks your users can share to.

Download this release

Release Info

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

Code changes from version 2.1 to 2.2

css/getsocial-style.css CHANGED
@@ -345,7 +345,7 @@ header h2 {
345
  }
346
 
347
  #steps .create-account {
348
- margin-top: 50px;
349
  text-align: center;
350
  }
351
 
@@ -523,3 +523,15 @@ i.fa {
523
  .loading-create {
524
  display: none;
525
  }
 
 
 
 
 
 
 
 
 
 
 
 
345
  }
346
 
347
  #steps .create-account {
348
+ margin-top: 20px;
349
  text-align: center;
350
  }
351
 
523
  .loading-create {
524
  display: none;
525
  }
526
+
527
+ .example {
528
+ margin-top: 50px;
529
+ text-align: center;
530
+ color: gray;
531
+ }
532
+
533
+ .create-gs-account {
534
+ font-size: 18px !important;
535
+ padding: 6px 50px !important;
536
+ height: auto !important;
537
+ }
images/big_total_horizontal.png ADDED
Binary file
images/welcome-bar.png ADDED
Binary file
init.php CHANGED
@@ -16,6 +16,11 @@
16
  <h1>Welcome and thanks for downloading GetSocial’s Share Buttons with Analytics.</h1>
17
  <p>To get started click on the button below to automatically create a GetSocial account.</strong></p>
18
 
 
 
 
 
 
19
  <div class="info gs-clearfix">
20
  <dl class="gs-clearfix">
21
  <dt>URL</dt>
@@ -27,7 +32,7 @@
27
 
28
  <p class="create-account">
29
  <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="button button-primary create-gs-account">
30
- Create Account
31
  </a>
32
 
33
  <span class="loading-create">
16
  <h1>Welcome and thanks for downloading GetSocial’s Share Buttons with Analytics.</h1>
17
  <p>To get started click on the button below to automatically create a GetSocial account.</strong></p>
18
 
19
+ <p class="example">
20
+ <span>A few seconds away from this...</span><br/>
21
+ <img src="<?php echo plugins_url( '/images/big_total_horizontal.png', __FILE__ ) ?>" alt="">
22
+ </p>
23
+
24
  <div class="info gs-clearfix">
25
  <dl class="gs-clearfix">
26
  <dt>URL</dt>
32
 
33
  <p class="create-account">
34
  <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="button button-primary create-gs-account">
35
+ Create your FREE account
36
  </a>
37
 
38
  <span class="loading-create">
lib/gs.php CHANGED
@@ -1,118 +1,123 @@
1
- <?php
2
-
3
- class GS {
4
- private $gs_url = "https://api.at.getsocial.io";
5
- private $gs_url_api = "//api.at.getsocial.io";
6
- private $gs_account = "http://getsocial.io/";
7
- private $api_url = "http://getsocial.io/api/v1/";
8
- // private $gs_url = "//localhost:3001";
9
- // private $gs_account = "http://localhost:3000/";
10
- // private $api_url = "http://localhost:3000/api/v1/";
11
-
12
- function __construct($api_key, $identifier, $lang){
13
- $this->api_key = $api_key;
14
- $this->identifier = $identifier;
15
- $this->lang = $lang == null ? 'en' : $lang;
16
- }
17
-
18
-
19
- private function api($path) {
20
- try {
21
- $r = wp_remote_get($this->api_url.$path, array());
22
-
23
- if(is_wp_error($r)):
24
- return null;
25
- endif;
26
-
27
- if ($r['response']['code'] == 200) {
28
- return json_decode($r['body']);
29
- } else {
30
- return null;
31
- }
32
- } catch (HttpException $ex) {
33
- echo "Error: ".$ex;
34
- }
35
- }
36
-
37
- function api_url($path){
38
- return $this->api_url.$path;
39
- }
40
-
41
- function getSite(){
42
- if($this->api_key != ''):
43
- return $this->api('sites/'.$this->api_key);
44
- else:
45
- return null;
46
- endif;
47
- }
48
-
49
- function refreshSite(){
50
- $site = $this->getSite();
51
- if($site != null):
52
- $this->save($site);
53
- endif;
54
- }
55
-
56
- function save($site_info){
57
- update_option('gs-identifier', $site_info->identifier);
58
- update_option('gs-pro', $site_info->pro);
59
- update_option('gs-apps', json_encode($site_info->gs_apps));
60
- }
61
-
62
- function apps($app_name){
63
- $apps = json_decode(get_option('gs-apps'), true);
64
-
65
- return (array_key_exists($app_name, $apps) ? $apps[$app_name] : false);
66
- }
67
-
68
- function is_pro(){
69
- return get_option('gs-pro');
70
- }
71
-
72
- function is_active($app_name){
73
- $app = $this->apps($app_name);
74
-
75
- return (!empty($app) ? $app['active'] : false);
76
- }
77
-
78
- function prop($app_name, $prop){
79
- $app = $this->apps($app_name);
80
- return $app[$prop];
81
- }
82
-
83
- function getLib(){
84
- $code = <<<EOF
85
- <script type="text/javascript">
86
- var GETSOCIAL_ID = "$this->identifier";
87
- var GETSOCIAL_LANG = "$this->lang";
88
- (function() {
89
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
90
- po.src = '$this->gs_url_api/widget/v1/gs_async.js?id='+GETSOCIAL_ID;
91
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
92
- })();
93
- </script>
94
- EOF;
95
- return $code;
96
- }
97
-
98
-
99
- function getCode($app_name){
100
- switch ($app_name) {
101
- case 'sharing_bar':
102
- return '<div class="getsocial gs-inline-group"></div>';
103
- case 'native_bar':
104
- return '<div class="getsocial gs-native-bar"></div>';
105
- case 'custom_actions':
106
- return '<div class="getsocial gs-custom-actions"></div>';
107
- case 'social_bar_big_counter':
108
- return '<div class="getsocial gs-inline-group gs-big-counter"></div>';
109
- default:
110
- return '';
111
- }
112
- }
113
-
114
- function gs_account(){
115
- return $this->gs_account;
116
- }
117
-
118
- }
 
 
 
 
 
1
+ <?php
2
+
3
+ class GS {
4
+ private $gs_url = "https://api.at.getsocial.io";
5
+ private $gs_url_api = "//api.at.getsocial.io";
6
+ private $gs_account = "http://getsocial.io/";
7
+ private $api_url = "http://getsocial.io/api/v1/";
8
+ // private $gs_url = "//localhost:3001";
9
+ // private $gs_account = "http://localhost:3000/";
10
+ // private $gs_url_api = "http://localhost:3001";
11
+ // private $api_url = "http://localhost:3000/api/v1/";
12
+
13
+ function __construct($api_key, $identifier, $lang){
14
+ $this->api_key = $api_key;
15
+ $this->identifier = $identifier;
16
+ $this->lang = $lang == null ? 'en' : $lang;
17
+ }
18
+
19
+
20
+ private function api($path) {
21
+ try {
22
+ $r = wp_remote_get($this->api_url.$path, array( 'sslverify' => false ));
23
+
24
+ if(is_wp_error($r)):
25
+ return null;
26
+ endif;
27
+
28
+ if ($r['response']['code'] == 200) {
29
+ return json_decode($r['body']);
30
+ } else {
31
+ return null;
32
+ }
33
+ } catch (HttpException $ex) {
34
+ echo "Error: ".$ex;
35
+ }
36
+ }
37
+
38
+ function api_url($path){
39
+ return $this->api_url.$path;
40
+ }
41
+
42
+ function getSite(){
43
+ if($this->api_key != ''):
44
+ return $this->api('sites/'.$this->api_key);
45
+ else:
46
+ return null;
47
+ endif;
48
+ }
49
+
50
+ function refreshSite(){
51
+ $site = $this->getSite();
52
+ if($site != null):
53
+ $this->save($site);
54
+ endif;
55
+ }
56
+
57
+ function save($site_info){
58
+ update_option('gs-identifier', $site_info->identifier);
59
+ update_option('gs-pro', $site_info->pro);
60
+ update_option('gs-apps', json_encode($site_info->gs_apps));
61
+ }
62
+
63
+ function apps($app_name){
64
+ $apps = json_decode(get_option('gs-apps'), true);
65
+
66
+ if($apps == null){
67
+ return false;
68
+ } else {
69
+ return (array_key_exists($app_name, $apps) ? $apps[$app_name] : false);
70
+ }
71
+ }
72
+
73
+ function is_pro(){
74
+ return get_option('gs-pro');
75
+ }
76
+
77
+ function is_active($app_name){
78
+ $app = $this->apps($app_name);
79
+
80
+ return (!empty($app) ? $app['active'] : false);
81
+ }
82
+
83
+ function prop($app_name, $prop){
84
+ $app = $this->apps($app_name);
85
+ return $app[$prop];
86
+ }
87
+
88
+ function getLib(){
89
+ $code = <<<EOF
90
+ <script type="text/javascript">
91
+ var GETSOCIAL_ID = "$this->identifier";
92
+ var GETSOCIAL_LANG = "$this->lang";
93
+ (function() {
94
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
95
+ po.src = '$this->gs_url_api/widget/v1/gs_async.js?id='+GETSOCIAL_ID;
96
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
97
+ })();
98
+ </script>
99
+ EOF;
100
+ return $code;
101
+ }
102
+
103
+
104
+ function getCode($app_name){
105
+ switch ($app_name) {
106
+ case 'sharing_bar':
107
+ return '<div class="getsocial gs-inline-group"></div>';
108
+ case 'native_bar':
109
+ return '<div class="getsocial gs-native-bar"></div>';
110
+ case 'custom_actions':
111
+ return '<div class="getsocial gs-custom-actions"></div>';
112
+ case 'social_bar_big_counter':
113
+ return '<div class="getsocial gs-inline-group gs-big-counter"></div>';
114
+ default:
115
+ return '';
116
+ }
117
+ }
118
+
119
+ function gs_account(){
120
+ return $this->gs_account;
121
+ }
122
+
123
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: share buttons, sharing buttons, share button, sharing button, sharing, share links, social buttons, social button, social sharing, social share, mobile sharing, mobile web shares, mobile shares, big counter, share counter, total shares, ecommerce, social analytics, addthis, sharethis, woocommerce, e-commerce, addtoany, admin, bookmark, bookmarking, bookmarks, button, Facebook, Facebook share, facebook like, google, google plus, google plus one, Like, linkedin, lockerz, pin, pin it, pinit, pinterest, plugin, plus 1, plus one, Post, posts, Reddit, save, seo, sexybookmarks, share, shareaholic, sharedaddy, sharethis, sharing, sidebar, sociable, social, social bookmarking, social bookmarks, statistics, stats, stumbleupon, tumblr, tweet, twitter, social media, widget, Sociable, Social Media Widget ,Really Simple Share ,Social Share Buttons for WordPress ,Slick Social Share Buttons ,Sharebar ,Socialize ,Trackable Social Share Icons ,Facebook Social Plugins ,Tilt Social Share Widget ,Artiss Social Share ,WP Socializer, Hupso Share Buttons for Twitter, Easy Facebook Share Thumbnail, Floating Social Media Links, Social Metrics, Socialize This
5
  Requires at least: 3.0
6
  Tested up to: 4.1
7
- Stable tag: 2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -29,6 +29,7 @@ Also, there's a tutorial on how to install this plugin in your Wordpress Account
29
  * **Dark social media tracking**: Tracking social media in alternative methods such as SMS, Chat or Copy & Paste URL will allow you to effectively measure social media ROI.
30
  * **Free Social Media Analytics**: All our social sharing plugins contribute for your undertanding on how social sharing is driving you traffic and conversions. From social share buttons to conversion tracking, your social media monitoring will be available in simple yet comprehensive dashboards.
31
  * **Custom Sharing Actions**: 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.
 
32
  * **Conversion Tracking**: Understand how social sharing is driving your conversions. Analyze results per user, per post or per social network.
33
  * **Mobile Web Sharing**: Mobile sharing doesn't have to be a terrible experinece. Create beautiful interfaces for your mobile users to share their thoughts about your content.
34
 
@@ -105,6 +106,10 @@ Have more doubts? You can go to <a href="http://feedback.getsocial.io">Getsocial
105
 
106
  == Changelog ==
107
 
 
 
 
 
108
  **2.1**
109
 
110
  - Added Big Total Shares Floating and Horizontal new apps.
4
  Tags: share buttons, sharing buttons, share button, sharing button, sharing, share links, social buttons, social button, social sharing, social share, mobile sharing, mobile web shares, mobile shares, big counter, share counter, total shares, ecommerce, social analytics, addthis, sharethis, woocommerce, e-commerce, addtoany, admin, bookmark, bookmarking, bookmarks, button, Facebook, Facebook share, facebook like, google, google plus, google plus one, Like, linkedin, lockerz, pin, pin it, pinit, pinterest, plugin, plus 1, plus one, Post, posts, Reddit, save, seo, sexybookmarks, share, shareaholic, sharedaddy, sharethis, sharing, sidebar, sociable, social, social bookmarking, social bookmarks, statistics, stats, stumbleupon, tumblr, tweet, twitter, social media, widget, Sociable, Social Media Widget ,Really Simple Share ,Social Share Buttons for WordPress ,Slick Social Share Buttons ,Sharebar ,Socialize ,Trackable Social Share Icons ,Facebook Social Plugins ,Tilt Social Share Widget ,Artiss Social Share ,WP Socializer, Hupso Share Buttons for Twitter, Easy Facebook Share Thumbnail, Floating Social Media Links, Social Metrics, Socialize This
5
  Requires at least: 3.0
6
  Tested up to: 4.1
7
+ Stable tag: 2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
29
  * **Dark social media tracking**: Tracking social media in alternative methods such as SMS, Chat or Copy & Paste URL will allow you to effectively measure social media ROI.
30
  * **Free Social Media Analytics**: All our social sharing plugins contribute for your undertanding on how social sharing is driving you traffic and conversions. From social share buttons to conversion tracking, your social media monitoring will be available in simple yet comprehensive dashboards.
31
  * **Custom Sharing Actions**: 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.
32
+ * **Welcome Bar**: Easily lead your visitors to a specific link. Great to generate conversions, engage with promotions and increase traffic.
33
  * **Conversion Tracking**: Understand how social sharing is driving your conversions. Analyze results per user, per post or per social network.
34
  * **Mobile Web Sharing**: Mobile sharing doesn't have to be a terrible experinece. Create beautiful interfaces for your mobile users to share their thoughts about your content.
35
 
106
 
107
  == Changelog ==
108
 
109
+ **2.2**
110
+
111
+ - Added Welcome Bar App.
112
+
113
  **2.1**
114
 
115
  - Added Big Total Shares Floating and Horizontal new apps.
tmpl/apps.php CHANGED
@@ -55,6 +55,12 @@
55
  'href' => $GS->gs_account().'/sites/gs-wordpress/mobile_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress',
56
  "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."
57
  ),
 
 
 
 
 
 
58
  );
59
 
60
  foreach($apps as $app => $settings):
55
  'href' => $GS->gs_account().'/sites/gs-wordpress/mobile_bar/new?api_key='.$GS->api_key.'&amp;source=wordpress',
56
  "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."
57
  ),
58
+ 'Welcome Bar' => array(
59
+ 'file' => 'welcome-bar',
60
+ 'active' => $GS->is_active('welcome_bar'),
61
+ 'href' => $GS->gs_account().'/sites/gs-wordpress/welcome_bars/new?api_key='.$GS->api_key.'&amp;source=wordpress',
62
+ "desc" => "Easily lead your visitors to a specific link. Great to generate conversions, engage with promotions and increase traffic. No code needed."
63
+ ),
64
  );
65
 
66
  foreach($apps as $app => $settings):
wp-share-buttons-analytics-getsocial.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Share Buttons & Mobile Sharing by GetSocial.io
4
  * Plugin URI: http://getsocial.io
5
  * Description: Share buttons for Wordpress and Mobile. Increase traffic from Facebook, Twitter, Google+, Pinterest and others. No code required.
6
- * Version: 2.1
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: GPL2
3
  * Plugin Name: Share Buttons & Mobile Sharing by GetSocial.io
4
  * Plugin URI: http://getsocial.io
5
  * Description: Share buttons for Wordpress and Mobile. Increase traffic from Facebook, Twitter, Google+, Pinterest and others. No code required.
6
+ * Version: 2.2
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: GPL2