Social Media Share Buttons - Version 2.0.1

Version Description

= 2.0.0 = We have updated our buttons design to make them look even better on your website. If you update the plugin you wont have access to our old buttons.

Download this release

Release Info

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

Code changes from version 2.0.0 to 2.0.1

css/getsocial-style.css CHANGED
@@ -519,3 +519,7 @@ i.fa {
519
  .btn.btn-pro:hover {
520
  background: #E07415;
521
  }
 
 
 
 
519
  .btn.btn-pro:hover {
520
  background: #E07415;
521
  }
522
+
523
+ .loading-create {
524
+ display: none;
525
+ }
init.php CHANGED
@@ -29,6 +29,10 @@
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
  </p>
33
 
34
  <div class="notification-bar success green-cta hidden">
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">
34
+ <i class="fa fa-circle-o-notch fa-spin"></i> Creating Account...
35
+ </span>
36
  </p>
37
 
38
  <div class="notification-bar success green-cta hidden">
js/plugin.js CHANGED
@@ -44,6 +44,7 @@ jQuery(function($) {
44
  jQuery('.api-key').hide();
45
 
46
  jQuery.post( 'options.php', data).success( function(response){
 
47
  jQuery('.notification-bar.success').show();
48
 
49
  setTimeout('window.location.reload();', 3000);
@@ -53,9 +54,11 @@ jQuery(function($) {
53
 
54
  jQuery('.create-gs-account').on('click', function(e){
55
  e.preventDefault();
56
- jQuery('.create-account').hide();
 
57
  jQuery.post(jQuery(this).attr('href'), { source: 'wordpress' }, function(data){
58
  if(data.errors != undefined){
 
59
  jQuery('.notification-bar.errors').html(data.errors[0]).show();
60
  jQuery('.api-key').show();
61
  } else {
44
  jQuery('.api-key').hide();
45
 
46
  jQuery.post( 'options.php', data).success( function(response){
47
+ jQuery('.loading-create').hide();
48
  jQuery('.notification-bar.success').show();
49
 
50
  setTimeout('window.location.reload();', 3000);
54
 
55
  jQuery('.create-gs-account').on('click', function(e){
56
  e.preventDefault();
57
+ jQuery('.create-gs-account').hide();
58
+ jQuery('.loading-create').show();
59
  jQuery.post(jQuery(this).attr('href'), { source: 'wordpress' }, function(data){
60
  if(data.errors != undefined){
61
+ jQuery('.loading-create').hide();
62
  jQuery('.notification-bar.errors').html(data.errors[0]).show();
63
  jQuery('.api-key').show();
64
  } else {
lib/gs.php CHANGED
@@ -1,12 +1,13 @@
1
  <?php
2
 
3
  class GS {
4
- private $gs_url = "http://api.at.getsocial.io";
5
- private $gs_account = "http://getsocial.io/";
6
- private $api_url = "http://getsocial.io/api/v1/";
7
- // private $gs_url = "//localhost:3001";
8
- // private $gs_account = "http://localhost:3000/";
9
- // private $api_url = "http://localhost:3000/api/v1/";
 
10
 
11
  function __construct($api_key, $identifier, $lang){
12
  $this->api_key = $api_key;
@@ -17,7 +18,7 @@ class GS {
17
 
18
  private function api($path) {
19
  try {
20
- $r = wp_remote_get($this->api_url.$path, array());
21
 
22
  if(is_wp_error($r)):
23
  return null;
@@ -86,7 +87,7 @@ class GS {
86
  var GETSOCIAL_LANG = "$this->lang";
87
  (function() {
88
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
89
- po.src = '$this->gs_url/widget/v1/gs_async.js?id='+GETSOCIAL_ID;
90
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
91
  })();
92
  </script>
@@ -103,6 +104,10 @@ EOF;
103
  return '<div class="getsocial gs-native-bar"></div>';
104
  case 'custom_actions':
105
  return '<div class="getsocial gs-custom-actions"></div>';
 
 
 
 
106
  }
107
  }
108
 
1
  <?php
2
 
3
  class GS {
4
+ // private $gs_url = "http://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;
18
 
19
  private function api($path) {
20
  try {
21
+ $r = wp_remote_get($this->api_url.$path, array( 'sslverify' => false ));
22
 
23
  if(is_wp_error($r)):
24
  return null;
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>
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
 
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, 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
 
@@ -30,6 +30,24 @@ GetSocial.io is the social media app-store for all your needs: from awareness to
30
  * **Conversion Tracking**: Understand how social sharing is driving your conversions. Analyze results per user, per post or per social network.
31
  * **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.
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  == Installation ==
34
 
35
  For an automatic installation through WordPress:
@@ -83,6 +101,10 @@ Have more doubts? You can go to <a href="http://feedback.getsocial.io">Getsocial
83
 
84
  == Changelog ==
85
 
 
 
 
 
86
  **2.0.0**
87
 
88
  - New Social Apps
4
  Tags: share buttons, sharing buttons, share button, sharing button, sharing, share links, social buttons, social button, social sharing, social share, 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.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
30
  * **Conversion Tracking**: Understand how social sharing is driving your conversions. Analyze results per user, per post or per social network.
31
  * **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.
32
 
33
+ <h4>Now with shortcodes!</h4>
34
+
35
+ With version **2.0.1** we've added the ability to insert shortcodes on your site. These allow you to insert our sharing bars in your Pages or in the middle of your Posts by adding a shortcode of your choice.
36
+
37
+ These are the shortcodes available:
38
+
39
+ * Sharing Bar
40
+
41
+ `[getsocial app="sharing_bar"]`
42
+
43
+ * Native Bar
44
+
45
+ `[getsocial app="native_bar"]`
46
+
47
+ * Custom Actions
48
+
49
+ `[getsocial app="custom_actions"]`
50
+
51
  == Installation ==
52
 
53
  For an automatic installation through WordPress:
101
 
102
  == Changelog ==
103
 
104
+ **2.0.1**
105
+
106
+ - Added Shortcodes
107
+
108
  **2.0.0**
109
 
110
  - New Social Apps
wp-share-buttons-analytics-getsocial.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Share Buttons & Analytics by GetSocial
4
  * Plugin URI: http://getsocial.io
5
  * Description: Add social media sharing buttons from the most popular networks to track user activity, increase traffic, improve SEO, and follow conversions.
6
- * Version: 2.0.0
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: GPL2
@@ -74,7 +74,6 @@ function add_gs_lib(){
74
  }
75
 
76
  add_filter('the_content', 'on_content');
77
- add_action('wp_footer', 'on_all_site');
78
 
79
  function on_content($content) {
80
  if ( is_single() ):
@@ -144,15 +143,16 @@ function on_content($content) {
144
  endif;
145
  }
146
 
147
- function on_all_site(){
148
- // $GS = get_gs();
149
-
150
- // $floating_active = get_option('gs-floating-active') == 1;
151
- // $floatingbar = "";
152
- //
153
- // if($floating_active):
154
- // $floatingbar .= $GS->getFloatingBar();
155
- // endif;
156
- //
157
- // echo $floatingbar;
 
158
  }
3
  * Plugin Name: Share Buttons & Analytics by GetSocial
4
  * Plugin URI: http://getsocial.io
5
  * Description: Add social media sharing buttons from the most popular networks to track user activity, increase traffic, improve SEO, and follow conversions.
6
+ * Version: 2.0.1
7
  * Author: Getsocial, S.A.
8
  * Author URI: http://getsocial.io
9
  * License: GPL2
74
  }
75
 
76
  add_filter('the_content', 'on_content');
 
77
 
78
  function on_content($content) {
79
  if ( is_single() ):
143
  endif;
144
  }
145
 
146
+ add_shortcode( 'getsocial', 'gs_bars_shortcode' );
147
+
148
+ function gs_bars_shortcode($atts) {
149
+ $GS = get_gs();
150
+ // if no type defined
151
+ if(array_key_exists('app',$atts)){
152
+ return $GS->getCode($atts['app']);
153
+ } else {
154
+ return "";
155
+ }
156
+
157
+
158
  }